【发布时间】:2018-04-01 09:40:11
【问题描述】:
这是我的 /usr/local/nginx/conf/nginx.conf:
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 错误 (我在 /var/www/test 中创建了 index.html 和 index.htm)
PS 我确实重新加载了:
/usr/local/nginx/sbin/nginx -s reload
【问题讨论】:
标签: nginx