From f65663071a1013c652b1f34c5031112e790455a2 Mon Sep 17 00:00:00 2001 From: zhangkaihuai Date: Wed, 19 Mar 2025 12:13:31 +0000 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20nginx.conf?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nginx.conf | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/nginx.conf b/nginx.conf index 9a9987c..ce43ff4 100644 --- a/nginx.conf +++ b/nginx.conf @@ -25,32 +25,10 @@ http { keepalive_timeout 65; - # HTTP重定向到HTTPS + server { listen 80; listen [::]:80; - server_name mosr.feashow.cn; - return 301 https://$host$request_uri; # 强制跳转HTTPS - } - # 新增HTTPS服务器块 - server { - listen 443 ssl; - listen [::]:443 ssl; - server_name mosr.feashow.cn; - - - # SSL证书配置 - ssl_certificate /etc/nginx/mosr.feashow.cn_chain.crt; - ssl_certificate_key /etc/nginx/private.key; - - # 优化SSL配置 - ssl_protocols TLSv1.2 TLSv1.3; - ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384; - ssl_prefer_server_ciphers off; - ssl_session_cache shared:SSL:10m; - ssl_session_timeout 1d; - ssl_session_tickets off; - location /api { proxy_pass http://gateway.$PROFILES.svc.cluster.local:8080; @@ -70,6 +48,5 @@ http { index index.html index.htm; try_files $uri $uri/ /index.html; } - - } +} }