我正在使用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 nginx
或sudo nginx -s reopen
但没有帮助:(
我得到它与yum安装工作。从这里http://nginx.org/packages/centos/6/SRPMS/的rpm src构建也可以。只是不知道为什么... –