From 589aafba777b1ea40c9f3774507fd14e0bec6173 Mon Sep 17 00:00:00 2001 From: liuchen864 <23082234@qq.com> Date: Thu, 16 May 2024 09:52:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0https?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.hella15 | 4 ++-- .env.hella16 | 4 ++-- nginx_prod.conf | 24 ++++++++++++++++++++++++ 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/.env.hella15 b/.env.hella15 index dc2a813d1..77d905c14 100644 --- a/.env.hella15 +++ b/.env.hella15 @@ -4,10 +4,10 @@ NODE_ENV=production VITE_DEV=false # 请求路径 -VITE_BASE_URL='http://172.21.32.15/api' +VITE_BASE_URL='https://172.21.32.15:55563/api' # 上传路径 -VITE_UPLOAD_URL='http://172.21.32.15/api/admin-api/infra/file/upload' +VITE_UPLOAD_URL='https://172.21.32.15:55563/api/admin-api/infra/file/upload' # 接口前缀 VITE_API_BASEPATH= diff --git a/.env.hella16 b/.env.hella16 index 9672dcd3e..251fa31e6 100644 --- a/.env.hella16 +++ b/.env.hella16 @@ -4,10 +4,10 @@ NODE_ENV=production VITE_DEV=false # 请求路径 -VITE_BASE_URL='http://172.21.32.16/api' +VITE_BASE_URL='https://172.21.32.16:55563/api' # 上传路径 -VITE_UPLOAD_URL='http://172.21.32.16/api/admin-api/infra/file/upload' +VITE_UPLOAD_URL='https://172.21.32.16:55563/api/admin-api/infra/file/upload' # 接口前缀 VITE_API_BASEPATH= diff --git a/nginx_prod.conf b/nginx_prod.conf index b849be01c..225deb142 100644 --- a/nginx_prod.conf +++ b/nginx_prod.conf @@ -49,5 +49,29 @@ http { index index.html index.htm; } } + server { + listen 55563 ssl; + server_name_in_redirect off; + server_name _; + ssl_certificate /opt/faway-hella/faway-hella.com.pem; + ssl_certificate_key /opt/faway-hella/faway-hella.com.key; + location /api/ { + proxy_pass http://sfms3.0/; + 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 /profile/ { + alias /opt/profile/; + index index.html index.htm; + } + location / { + try_files $uri $uri/ /index.html; + root /opt/sfms3.0; + index index.html index.htm; + } + } }