原来的配置为:

1
2
3
4
5
6
7
 location ~ \.php$ {
root /opt/www/; #我的根路径
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;

}

修改后的配置为:

1
2
3
4
5
6
7
8
location ~ \.php {
root /opt/www/; #我的根路径
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
include fastcgi.conf;
fastcgi_param PATH_INFO $fastcgi_path_info;
}