diff --git a/.env.test b/.env.test index b7221ef..00dbe3c 100644 --- a/.env.test +++ b/.env.test @@ -1,8 +1,8 @@ # port -VITE_DEV_PORT = '28009' +VITE_DEV_PORT = '28001' # production path -VITE_BASE_URL = 'http://dev.ccwin-in.com:28009' +VITE_BASE_URL = 'http://dev.ccwin-in.com:28001/api' # 租户开关 VITE_APP_TENANT_ENABLE=false \ No newline at end of file diff --git a/nginx.conf b/nginx.conf index 44a4d1e..4eadab2 100644 --- a/nginx.conf +++ b/nginx.conf @@ -26,10 +26,21 @@ 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 zhucheng { + server localhost:28009 weight=10 max_fails=3 fail_timeout=10s; + } server { listen 28001; server_name_in_redirect off; server_name dev.ccwin-in.com; + location /api/ { + proxy_pass http://zhucheng/; + 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; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $http_x_forwarded_for; + } location / { proxy_cache my_zone; proxy_cache_valid 200 304 12h;