0
我想设置nginx使用子路径,但我收到404 error.I使用默认位置和html文件。Nginx的子路径显示404错误
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.Everything开放是好的开/路径时,但是当我去/ YT /我得到一个404错误。
其实问题是我没有在nginx中的html文件夹中创建一个子文件夹。查看错误日志并找到它。非常感谢。 – erkidhoxholli
很高兴它的工作 –