mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-21 20:55:14 +00:00
Merge pull request #121 from 1014TaoTao/v2.0.0
fix(nginx): 更新fastapp静态文件路径和API路由前缀
This commit is contained in:
@@ -54,11 +54,10 @@ http {
|
||||
root /usr/share/nginx/html; #nginx容器规定位置;
|
||||
index index.html index.htm;
|
||||
try_files $uri $uri/ /fastapp/index.html; #解决页面刷新404问题
|
||||
|
||||
}
|
||||
|
||||
# 后端代理
|
||||
location /gateway/api/v1 {
|
||||
location /api/v1 {
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
||||
+1
-1
@@ -67,7 +67,7 @@ services:
|
||||
volumes:
|
||||
- ./devops/nginx/nginx.conf:/etc/nginx/nginx.conf
|
||||
- ./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
|
||||
depends_on:
|
||||
- backend
|
||||
|
||||
Reference in New Issue
Block a user