【发布时间】:2016-07-27 22:02:57
【问题描述】:
我正在尝试设置 nginx 以使用子路径,但我收到 404 错误。我正在使用默认位置和 html 文件。
Nginx 配置如下:
server {
listen 80;
listen[::]:80 ipv6only=on;
server_name localhost;
## serving gogs
location / {
proxy_pass http://localhost:3000;
}
## serving laravel-based web app
location /yt/ {
root /usr/share/nginx/html;
index index.html index.htm;
}
}
防火墙 (ufw) 已禁用,所有端口均通过 mikrotik 打开。打开 / 路径时一切正常,但转到 /yt/ 时出现 404 错误。
【问题讨论】:
标签: nginx