diff --git a/inventory-web/nginx.conf b/inventory-web/nginx.conf index 5ad5c7c..f5eb62c 100644 --- a/inventory-web/nginx.conf +++ b/inventory-web/nginx.conf @@ -37,8 +37,10 @@ server { } # 3. 后端 API 接口代理 + # ★ 使用容器名 inventory_api_prod 而非服务名 backend, + # 避免与其他 compose 项目的 backend 服务 DNS 冲突(track_backend_prod) location /api/ { - proxy_pass http://backend:8000; + proxy_pass http://inventory_api_prod:8000; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr;