fix: API 反代保留 /api 路径修复 404;admin 容器 location /;宿主机 Nginx 反代到 8443 说明

Made-with: Cursor
This commit is contained in:
whm
2026-03-17 22:49:48 +08:00
parent 6044786380
commit 483560bcfc
4 changed files with 18 additions and 36 deletions

View File

@@ -30,8 +30,9 @@ server {
proxy_set_header X-Forwarded-Proto $scheme;
}
# 不要用尾部斜杠,否则 /api/health 会变成 /health而后端注册的是 /api/health
location /api/ {
proxy_pass http://api:8088/;
proxy_pass http://api:8088;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;