location ~ \.php$ {
root /usr/share/nginx/html;
try_files $uri = 404;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_index index.php;
fastcgi_pass unix:/var/run/php5-fpm.sock;
#fastcgi_pass 127.0.0.1:9000;
}
你可以去后盾人平台看看,里面的东西不错
温馨提示:答案为网友推荐,仅供参考