0
这里是我的/usr/local/nginx/conf/nginx.conf:为什么nginx位置返回404错误?
server {
listen 8080;
server_name localhost;
location/{
root html;
index index.html index.htm;
}
location /test{
root /var/www/test;
index index.html index.htm;
}
当我键入:http://localhost:8080/:我nginx的欢迎页面:好
当我在http://localhost:8080/test键入:我得到了一个404错误 (我创建的index.html和里面的/ var/WWW/index.htm的测试)
PS我没有与重装:
/usr/local/nginx/sbin/nginx -s reload
当然,我确实重新加载了。你能告诉我更多关于权利和所有者吗? – yarek
NGinx服务器与哪个用户一起运行? – Indent
Nginx以root用户身份运行。 nginx似乎可以:当我将端口8080更改为8089时,我需要去lcoalhost:8089。奇怪的是:当我评论指令“位置/”时,我仍然可以去/位置 – yarek