mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-21 04:46:26 +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容器规定位置;
|
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
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user