Files
iAOP/deploy/fba/nginx-fba.conf
T

37 lines
1.3 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# =============================================================================
# iAOP nginx 片段:将 /fba/ 前缀反代到 FBA 后端(127.0.0.1:8001)
#
# 用法:由运维将本文件 include 进现有 iAOP 站点的 server 块
# (与 8090 现有 location 并列),例如:
#
# server {
# listen 8090;
# ... 现有 iAOP 配置 ...
# include /opt/apps/iAOP/deploy/fba/nginx-fba.conf;
# }
#
# 路径映射:/fba/api/v1/auth/login → http://127.0.0.1:8001/api/v1/auth/login
# 说明:FBA 后端所有接口都在 /api/v1 之下,FBA UI 请求形如
# ${VITE_GLOB_API_URL}/api/v1/...,因此部署 FBA UI 时应将其
# VITE_GLOB_API_URL 配置为 https://<域名>/fba
# =============================================================================
location /fba/ {
# 去掉 /fba 前缀后转发
proxy_pass http://127.0.0.1:8001/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# FBA 登录/刷新 token 走 cookie + bearer,允许凭据
proxy_http_version 1.1;
proxy_set_header Connection "";
# 上传接口(sys/files)可能较大
client_max_body_size 50m;
proxy_read_timeout 60s;
}