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"

一直无解啊,求助!泪!
...全文
1277 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
钛元素 2011-11-04
  • 打赏
  • 举报
回复
楼上的怎么说哪里错了
linginfanta 2011-10-26
  • 打赏
  • 举报
回复
显然配置错误
钛元素 2011-10-17
  • 打赏
  • 举报
回复
无解了都?
钛元素 2011-10-14
  • 打赏
  • 举报
回复
我觉得还是location的路径问题,但是就是百试不得其解

5,655

社区成员

发帖
与我相关
我的任务
社区描述
Web开发应用服务器相关讨论专区
社区管理员
  • 应用服务器社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧