nginx proxy.conf位置:静态文件503错误

问题描述 投票:0回答:1

在proxy.conf中,我有这个

location /anomaly-detection/static/ {
      access_by_lua_file lua/auth.lua;
      proxy_pass http://127.0.0.1:8000/static/;
      proxy_set_header Host $host;
    }

提供静态文件。

但是,当我尝试访问这些文件时,总是得到503服务暂时不可用

示例:静态文件之一的位置是

https://host-address/anomaly-detection/static/js/10.c8b175cd.chunk.js

我的静态文件位置规则是否有问题?

nginx nginx-location nginx-config nginx-ingress http-status-code-503
1个回答
0
投票

使用以下规则和测试。

location /anomaly-detection/static/ {
      access_by_lua_file lua/auth.lua;
      proxy_pass http://127.0.0.1:8000/;
      proxy_set_header Host $host;
    }
© www.soinside.com 2019 - 2024. All rights reserved.