From a00a360138610bcbb1a284d9a51a02701ebd7b28 Mon Sep 17 00:00:00 2001 From: danial Date: Tue, 18 Nov 2025 15:02:50 +0800 Subject: [PATCH] =?UTF-8?q?fix(deploy):=20=E4=BF=AE=E5=A4=8D=20Nginx=20?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E4=B8=AD=E7=9A=84=20DNS=20=E8=A7=A3=E6=9E=90?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加 Docker DNS 服务器解析配置,设置缓存有效期为 10 秒 - 配置解析超时为 5 秒,提升 DNS 解析稳定性 - 保证 Nginx 能够正确解析容器内域名请求 --- deploy/nginx/default.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/deploy/nginx/default.conf b/deploy/nginx/default.conf index e368240..27388a0 100644 --- a/deploy/nginx/default.conf +++ b/deploy/nginx/default.conf @@ -1,3 +1,6 @@ +resolver 127.0.0.11 valid=10s; # Docker DNS 服务器,10秒过期 DNS 缓存 +resolver_timeout 5s; + server { listen 12400; server_name localhost;