barbery
2013-05-10 22:24:27 +08:00
location ~ \.php
{
fastcgi_index index.php;
fastcgi_pass 127.0.0.1:9000;
include /usr/local/Cellar/nginx/conf/fastcgi_params;
set $path_info "";
set $real_script_name $fastcgi_script_name;
if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") {
set $real_script_name $1;
set $path_info $2;
}
fastcgi_param SCRIPT_FILENAME /usr/local/Cellar/nginx/html/$real_script_name;
fastcgi_param SCRIPT_NAME $real_script_name;
fastcgi_param PATH_INFO $path_info;
}
我的nginx.conf 是这样配的。。。这样在本地开发使用php mvc框架,也不会有pathinfo问题。。。具体路径你可能还要改改