#FastCGI配置 开启Path_info支持
    location ~* ^(.+\.php)(.*)$ {
    fastcgi_pass unix:/var/run/www.sock;

    fastcgi_split_path_info ^(.+\.php)(.*)$;
    fastcgi_param PATH_INFO $fastcgi_path_info;
    fastcgi_param PATH_TRANSLATED $rootdir/$fastcgi_path_info;

    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $rootdir/$fastcgi_script_name;
    include fastcgi_params;
    }
php.ini中打开配置cgi.fix_pathinfo为1
这样就打开pathinfo了
但是这样还有一个文件解析的漏洞
if ($request_filename ~* (.*)\.php) {
set $php_url $1;
}
if (!-e $php_url.php) {
return 404;
}
搞定