- 論壇徽章:
- 0
|
我配置了一段nginx的虛擬主機,想要實現(xiàn)當(dāng)訪問根目錄下的文件時,去調(diào)用/control/web/下的文件,而如果根目錄下不寫任何東西(即只訪問域名),則取調(diào)用/control/web/下的默認文件,即index.html、index.htm、index.php,如下是配置信息,當(dāng)訪問域名網(wǎng)址時,提示"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;
- }
- }
復(fù)制代碼
查看錯誤日志:
- 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"
復(fù)制代碼
是在無休止的循環(huán),請問我的配置哪里出問題了?應(yīng)該如何解決?謝謝 |
|