From a2ff1befdf0d2319f6b64b2601af9cd35fb526d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E5=B0=8F=E4=BA=91?= Date: Wed, 11 Jun 2025 19:42:50 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nginxbazhong/vhosts/dsp.conf | 2 +- nginxbazhong/vhosts/hhz.conf | 2 +- start/gateway/startGateway.sh | 1 + start/nginx.sh | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/nginxbazhong/vhosts/dsp.conf b/nginxbazhong/vhosts/dsp.conf index 0db929c..40b0dc1 100644 --- a/nginxbazhong/vhosts/dsp.conf +++ b/nginxbazhong/vhosts/dsp.conf @@ -31,7 +31,7 @@ location /api { - proxy_pass http://gatewayService; + proxy_pass http://HOSTNAME:7011; 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/nginxbazhong/vhosts/hhz.conf b/nginxbazhong/vhosts/hhz.conf index 1759d98..ed21f59 100644 --- a/nginxbazhong/vhosts/hhz.conf +++ b/nginxbazhong/vhosts/hhz.conf @@ -46,7 +46,7 @@ } location /hhz { - proxy_pass http://gatewayService/hhz; + proxy_pass http://HOSTNAMEIP:7011/hhz; 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/start/gateway/startGateway.sh b/start/gateway/startGateway.sh index cf4e90d..e4fa979 100755 --- a/start/gateway/startGateway.sh +++ b/start/gateway/startGateway.sh @@ -37,6 +37,7 @@ echo "正在启动 ${GATEWAY_NAME} 容器..." docker run --pull always -d \ --name ${GATEWAY_NAME} \ --network ${NETWORK} \ + -p 7011:7011 \ --add-host ${OIDC_SERVER_DOMAIN}:host-gateway \ --env TZ=Asia/Shanghai \ --env SPRING_CONFIG_LOCATION=file:/data/java/tuoheng/application.yml \ diff --git a/start/nginx.sh b/start/nginx.sh index 957a93f..09d31c6 100755 --- a/start/nginx.sh +++ b/start/nginx.sh @@ -12,6 +12,7 @@ fi DOCKER_RUN_CMD="docker run --pull always -d \ --name ${NGINX_NAME} \ --network ${NETWORK} \ +--add-host HOSTNAMEIP:host-gateway \ -p ${NGINX_HTTP_PORT}:80 \ -p ${NGINX_HTTPS_PORT}:443 \ --env TZ=Asia/Shanghai \