1、 php.ini(/your/php.ini)的配置中这两项
cgi.fix_pathinfo=1
doc_root=
2、nginx配置文件/etc/nginx/sites-available/default中注意以下部分
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /youpath$fastcgi_script_name;
include fastcgi_params;
}
路径需要根据你主机主目录的实际情况填写

配置完以上部分,重启一下service nginx restart,应该没问题了

Comments are closed.

Post Navigation