Merge pull request #121 from 1014TaoTao/v2.0.0

fix(nginx): 更新fastapp静态文件路径和API路由前缀
This commit is contained in:
fastapiadmin
2025-08-17 01:54:09 +08:00
committed by GitHub
2 changed files with 2 additions and 3 deletions
+1 -2
View File
@@ -54,11 +54,10 @@ http {
root /usr/share/nginx/html; #nginx容器规定位置; root /usr/share/nginx/html; #nginx容器规定位置;
index index.html index.htm; index index.html index.htm;
try_files $uri $uri/ /fastapp/index.html; #解决页面刷新404问题 try_files $uri $uri/ /fastapp/index.html; #解决页面刷新404问题
} }
# 后端代理 # 后端代理
location /gateway/api/v1 { location /api/v1 {
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+1 -1
View File
@@ -67,7 +67,7 @@ services:
volumes: volumes:
- ./devops/nginx/nginx.conf:/etc/nginx/nginx.conf - ./devops/nginx/nginx.conf:/etc/nginx/nginx.conf
- ./frontend/dist:/usr/share/nginx/html/frontend - ./frontend/dist:/usr/share/nginx/html/frontend
- ./fastapp/dist:/usr/share/nginx/html/fastapp - ./fastapp/dist/build/h5:/usr/share/nginx/html/fastapp
- ./fastdocs/dist:/usr/share/nginx/html/fastdocs - ./fastdocs/dist:/usr/share/nginx/html/fastdocs
depends_on: depends_on:
- backend - backend