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(); ?>