From 5c0c791a9fbe796ec2d11c9a9ccf050af1081b38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E5=B0=8F=E4=BA=91?= Date: Fri, 27 Jun 2025 15:12:43 +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 --- nginxdashuju/vhosts/business.conf | 56 +++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 nginxdashuju/vhosts/business.conf diff --git a/nginxdashuju/vhosts/business.conf b/nginxdashuju/vhosts/business.conf new file mode 100644 index 0000000..e1ded88 --- /dev/null +++ b/nginxdashuju/vhosts/business.conf @@ -0,0 +1,56 @@ + server + { + listen 80; + listen 443 ssl; + server_name ${BUSINESS_DOMAIN}; + root /data/tuoheng_business_web/dist; + client_max_body_size 2g; + # SSL证书配置 + ssl_certificate /etc/nginx/t-aaron.com.pem; + ssl_certificate_key /etc/nginx/t-aaron.com.key; + ssl_session_timeout 5m; + ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4; + ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3; + ssl_prefer_server_ciphers on; + + # 开启gzip功能 + gzip on; + gzip_min_length 10k; + gzip_comp_level 9; + gzip_types text/plain text/css application/javascript application/x-javascript text/javascript application/xml; + gzip_vary on; + gzip_disable "MSIE [1-6]\."; + + + location /{ + try_files $uri $uri/ @router; + index index.html; + proxy_redirect http://${BUSINESS_DOMAIN} https://${BUSINESS_DOMAIN_FULL}; + } + + location @router{ + rewrite ^.*$ /index.html last; + } + + location /permission { + proxy_pass http://businessService; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + } + + location /business-mini { + proxy_pass http://gatewayService; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + } + + location /business { + proxy_pass http://gatewayService/business; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + } + + } \ No newline at end of file