vi /etc/nginx/conf.d/default.conf
# 删除如下部分的注释,
#把一下倒数第二行的/scripts改为你工程目录,如:
# fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html$fastcgi_script_name;
location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
include fastcgi_params;
}
lnmp 通过localhost访问本地80端口并解析PHP,布布扣,bubuko.com
lnmp 通过localhost访问本地80端口并解析PHP
原文:http://my.oschina.net/linuxjd/blog/303677