安裝 php on nginx - rocodev/guides GitHub Wiki
apt-get update
apt-get upgrade
apt-get install php5-cli php5-cgi spawn-fcgi psmisc
編輯 /opt/nginx/conf/nginx.conf
server {
server_name goldmine.io;
access_log /home/apps/html/logs/access.log;
error_log /home/apps/html/logs/error.log;
root /home/apps/html/wordpress;
location / {
index index.html index.htm index.php;
}
location ~ \.php$ {
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_pass unix:/var/run/php-fastcgi/php-fastcgi.socket;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /home/apps/html/wordpress$fastcgi_script_name;
}
}