2012-12-21 70 views
1

我正在使用Cent OS 6.1。 我通過源碼的./configure方法安裝了Nginx。我通過sudo nginx啓動了nginx服務器,它可以提供歡迎使用Nginx頁面。Nginx不斷顯示歡迎使用Nginx

但是,當我編輯/usr/local/nginx/conf/nginx.conf文件時,發現更改...location/{... }...塊沒有任何影響。

例如,改變

location/{ 
    root html; 
    index index.htm index.html; 
} 

location/{ 
    root xyz123; #which does not exist 
    index index.htm index.html; 
} 

應該給404.但是,不斷出現的歡迎頁面。

即使我刪除整個位置塊,它仍然顯示歡迎頁面。但是,如果我將/usr/local/nginx/html更改爲/usr/local/nginx/htmlxyz它顯示404.是否有另一個運行的conf文件覆蓋了nginx.conf?

p.s.我做sudo nginx -s stop然後sudo nginxsudo nginx -s reopen但沒有幫助:(

+0

我得到它與yum安裝工作。從這裏http://nginx.org/packages/centos/6/SRPMS/的rpm src構建也可以。只是不知道爲什麼... –

回答