location /zz/ {
alias ../zz/;
index index.html index.htm index.php;
}
location ~ ^/zz/.+\.php$ {
alias ../zz/;
rewrite /zz/(.*\.php?) /$1 break;
include fastcgi.conf;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME ../zz$fastcgi_script_name;
}
就是这样配置虚拟目录"zz"的php,页面返回的信息是"No input file specified."
静态页面可以正常访问。