From e268c33fa999de331a10855cf21a2de275274985 Mon Sep 17 00:00:00 2001 From: hailin Date: Sun, 28 Dec 2025 18:29:59 -0800 Subject: [PATCH] =?UTF-8?q?fix(nginx):=20=E9=9B=86=E6=88=90certbot?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=E5=88=9B=E5=BB=BA=E5=88=B0=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在安装脚本的configure_http步骤中添加: - 创建完整的webroot目录结构: /var/www/certbot/.well-known/acme-challenge - 设置正确的权限: chmod -R 755 这确保Let's Encrypt验证能正常工作,解决404错误问题。 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- backend/api-gateway/nginx/install-mpc-grpc.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/api-gateway/nginx/install-mpc-grpc.sh b/backend/api-gateway/nginx/install-mpc-grpc.sh index 29bf74f3..774f84f8 100644 --- a/backend/api-gateway/nginx/install-mpc-grpc.sh +++ b/backend/api-gateway/nginx/install-mpc-grpc.sh @@ -69,8 +69,9 @@ check_prerequisites() { configure_http() { log_info "步骤 1/4: 创建临时 HTTP 配置..." - # 确保 certbot webroot 目录存在 - mkdir -p /var/www/certbot + # 确保 certbot webroot 目录及子目录存在 + mkdir -p /var/www/certbot/.well-known/acme-challenge + chmod -R 755 /var/www/certbot # 创建临时 HTTP 配置 cat > /etc/nginx/sites-available/$DOMAIN << EOF