修复健康检查失败: nginx补上IPv6监听

首次部署时健康检查一直失败——容器内nginx只listen了IPv4(0.0.0.0:80),
但/etc/hosts里localhost解析到::1在前,wget http://localhost/因而连不上。
补上 listen [::]:80 双栈监听解决。部署脚本那边也同步改成直连127.0.0.1,
避免再依赖localhost的解析顺序。
This commit is contained in:
Your Name
2026-08-11 12:52:06 +08:00
parent 85ac8ce43b
commit 111d9040a7
+1
View File
@@ -1,5 +1,6 @@
server {
listen 80;
listen [::]:80;
server_name _;
root /usr/share/nginx/html;
index index.html;