nginx通过多个location访问多个站点求助
钛元素 2011-10-14 08:42:14 大大您好!
关于nginx遇到一个疑难问题,百度无解后只好来求助于大家,还望相助!
因需要在win上配置nginx环境,现想搭建一个localhost本地环境(关闭iis)
nginx1.1.5+php5.3.8+fastcgi,配置成功,可以正常运行
现在想在一个server配置段中,通过多个location来访问多个web程序,如下:
location / {
#设置网站默认首页文件
index index.html index.htm index.php;
#设置网站根目录
root d:/web/php/;
}
location /rencai1/ {
index index.html index.htm index.php;
alias /web/php/rencai/rencai1/;
}
location /rencai2/ {
index index.html index.htm index.php;
alias /web/php/test/;
}
访问http://localhost/rencai1/index.php 或者 http://localhost/rencai2/ 都提示:
No input file specified.
日志显示:
127.0.0.1 - - [14/Oct/2011:19:47:35 +0800] "GET /rencai1/index.php HTTP/1.1" 404 36 "-" "Mozilla/5.0 (Windows NT 5.2; rv:7.0.1) Gecko/20100101 Firefox/7.0.1"
127.0.0.1 - - [14/Oct/2011:20:41:41 +0800] "GET /rencai2/test2.php HTTP/1.1" 404 36 "-" "Mozilla/5.0 (Windows NT 5.2; rv:7.0.1) Gecko/20100101 Firefox/7.0.1"
一直无解啊,求助!泪!