- 论坛徽章:
- 0
|
我配置了一段nginx的虚拟主机,想要实现当访问根目录下的文件时,去调用/control/web/下的文件,而如果根目录下不写任何东西(即只访问域名),则取调用/control/web/下的默认文件,即index.html、index.htm、index.php,如下是配置信息,当访问域名网址时,提示"500 Internal Server Error",但是/control/web/下确实有index.html文件。
配置如下:
- server
- {
- listen 80;
- server_name [url]www.abcd.com[/url];
- index index.html index.htm index.php;
- root /www/;
- rewrite ^/(.*) /control/web/$1;
- 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;
- }
- }
复制代码
查看错误日志:
- 2009/07/19 23:32:44 [error] 17053#0: *95 rewrite or internal redirection cycle while processing "/control/web/control/web/control/web/control/web/control/web/control/web/control/web/control/web/control/web/control/web/control/web/control/web/", client: 123.103.8.11, server: [url]www.abcd.com[/url], request: "GET / HTTP/1.1", host: "www.abcd.com"
复制代码
是在无休止的循环,请问我的配置哪里出问题了?应该如何解决?谢谢 |
|