CubieTruck:Php+Nginx
安装nginx和php
apt-get install nginx
apt-get install php5 php-pear php-fpm
配置
修改/etc/nginx/sites-available/default
location ~ \.php$ {
include snippets/fastcgi-php.conf;
#
# # With php5-cgi alone:
# fastcgi_pass 127.0.0.1:9000;
# # With php5-fpm:
fastcgi_pass unix:/var/run/php5-fpm.sock;
}
重启nginx:
/etc/init.d/nginx restart
测试
在/var/www/html下新建一个index.php试试:
<?php phpinfo(); ?>
页面如下:
PHP Version 5.6.20-0+deb8u1 System Linux cubietruck 3.4.79 #1 SMP PREEMPT Thu Dec 25 09:30:25 CST 2014 armv7l Build Date Apr 27 2016 18:43:08 Server API FPM/FastCGI ...