nginx默认不支持pathinfo模式,而php的一些框架需要pathinfo模式支持。需要修改nginx配置文件,修改如下,已亲测有效。
location ~ \.php { #去掉结尾的$
root /var/www;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$; #增加这一句
fastcgi_param PATH_INFO $fastcgi_path_info; #增加这一句
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
楼主残忍的关闭了