diff --git a/devops/nginx/nginx.conf b/devops/nginx/nginx.conf index 21bae8f0..8d5c38fb 100644 --- a/devops/nginx/nginx.conf +++ b/devops/nginx/nginx.conf @@ -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; diff --git a/docker-compose.yaml b/docker-compose.yaml index 4f883173..891a0cfc 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -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