【发布时间】:2012-04-22 11:18:27
【问题描述】:
server {
listen 80;
server_name pwta;
root html;
location /test/{
alias html/test/;
autoindex on;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
此配置有效。但是,如果 location /test/ 被替换,例如location /testpath/ 它不起作用(未指定输入文件)。我假设基于别名指令的解释,“位置”部分被删除,因此/testpath/info.php 将导致html/test/info.php。
感谢您的任何建议。
【问题讨论】: