From 845803fd84e37fb1da00147cebe4fb4d30df5be7 Mon Sep 17 00:00:00 2001 From: liuchen864 <23082234@qq.com> Date: Fri, 10 May 2024 17:33:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=AB=AF=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile_prod | 6 +++--- nginx.conf | 4 ++-- nginx_prod.conf | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Dockerfile_prod b/Dockerfile_prod index a1078c3..bbbda93 100644 --- a/Dockerfile_prod +++ b/Dockerfile_prod @@ -1,7 +1,7 @@ # 设置基础镜像 FROM win-nginx -WORKDIR /opt/eam +WORKDIR /opt/tianhe COPY nginx_prod.conf /usr/local/nginx/conf/nginx.conf -# 将dist文件中的内容复制到 /opt/eam 这个目录下面 -COPY eam/ /opt/eam +# 将dist文件中的内容复制到 /opt/tianhe 这个目录下面 +COPY tianhe/ /opt/tianhe diff --git a/nginx.conf b/nginx.conf index 95303ed..c5e591b 100644 --- a/nginx.conf +++ b/nginx.conf @@ -32,7 +32,7 @@ http { server { listen 28020; server_name_in_redirect off; - server_name dev.ccwin-in.com; + server_name _; location /api/ { proxy_pass http://tianhe/; proxy_next_upstream http_500 http_502 http_503 http_504 error timeout invalid_header; @@ -57,4 +57,4 @@ http { index index.html index.htm; } } -} \ No newline at end of file +} diff --git a/nginx_prod.conf b/nginx_prod.conf index 8cb1610..6020963 100644 --- a/nginx_prod.conf +++ b/nginx_prod.conf @@ -26,15 +26,15 @@ http { gzip_types text/plain application/javascript text/css application/xml text/javascript image/jpeg image/gif image/png; gzip_vary on; gzip_disable "MSIE [1-6]\."; - upstream eam { + upstream tianhe { server localhost:90 weight=10 max_fails=3 fail_timeout=10s; } server { listen 80; server_name_in_redirect off; - server_name dev.ccwin-in.com; + server_name _; location /api/ { - proxy_pass http://eam/; + proxy_pass http://tianhe/; proxy_next_upstream http_500 http_502 http_503 http_504 error timeout invalid_header; proxy_set_header X-Forwared-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; @@ -53,7 +53,7 @@ http { proxy_cache_valid 200 304 12h; proxy_cache_key $host$uri$is_args$args; try_files $uri $uri/ /index.html; - root /opt/eam; + root /opt/tianhe; index index.html index.htm; } }