fix(nginx): 集成certbot目录创建到安装脚本

在安装脚本的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 <noreply@anthropic.com>
This commit is contained in:
hailin 2025-12-28 18:29:59 -08:00
parent c457d15829
commit e268c33fa9
1 changed files with 3 additions and 2 deletions

View File

@ -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