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 \