From 529e0e62ab3d4fb7488177aac9243909b689bd58 Mon Sep 17 00:00:00 2001 From: zk Date: Wed, 15 Jul 2026 20:23:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E6=9C=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E5=9F=9F=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nginx.conf | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/nginx.conf b/nginx.conf index 262415d..7c824c8 100644 --- a/nginx.conf +++ b/nginx.conf @@ -59,7 +59,7 @@ http { return 301 https://$host$request_uri; } - # 默认处理:未匹配的域名或 IP 访问返回 444 + # 默认处理:裸域名及所有未匹配的域名/IP 统一 301 跳转到 www 前端 server { listen 443 ssl default_server; http2 on; @@ -68,18 +68,6 @@ http { ssl_certificate /etc/nginx/ssl/offerpai.com.cn.crt; ssl_certificate_key /etc/nginx/ssl/offerpai.com.cn.key; - return 444; - } - - # 裸域名重定向:offerpai.com.cn → www.offerpai.com.cn - server { - listen 443 ssl; - http2 on; - server_name offerpai.com.cn; - - ssl_certificate /etc/nginx/ssl/offerpai.com.cn.crt; - ssl_certificate_key /etc/nginx/ssl/offerpai.com.cn.key; - return 301 https://www.offerpai.com.cn$request_uri; }