小编jan*_*rau的帖子

NGINX 404 未找到但文件存在

我想从文件夹/var/www/fileUpload/html 中调用index.html。该文件夹中存在index.html 文件。

/ 路由器工作。uploadFiles 路由也是如此。但是当我打开上传路由时,出现 404 错误。

    server{
    listen 80;
    server_name xx.xx.xxx.xxx;

    location / {
        root /var/www/kioskJPE/html;
        index index.html;
    }
    location /upload {
        root /var/www/fileUpload/html;
        index index.html;
    }
    location /uploadFiles {
        proxy_pass http://localhost:8080;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }
}
Run Code Online (Sandbox Code Playgroud)

你有什么建议吗?谢谢你!

linux host nginx server

4
推荐指数
1
解决办法
1万
查看次数

标签 统计

host ×1

linux ×1

nginx ×1

server ×1