支持thinkphp等支持PATHINFO模式 

新建www.conf配置一个新的虚拟主机内容,并添加以下内容:

server{
    listen 80;
    server_name www.test.com;
    location / {
        root html/www;
        index index.php index.html index.htm;
    }
    location ~ \.php(.*)$ {
        root html/www;
        fastcgi_pass 127.0.0.1:9000;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param PATH_INFO $1;
        include fastcgi_params;
    }
}

源地址: http://www.yanshiba.com/archives/700