问题:
- 使用--nginx参数时,acme.sh报错"Cannot find config file for domain"
- nginx模式需要acme.sh能够识别nginx配置文件格式
解决方案:
- 改用--webroot模式,直接使用前端目录作为验证根目录
- webroot模式更可靠,不依赖nginx配置文件解析
- 应用到所有acme.sh方案:Let's Encrypt、ZeroSSL、Buypass
参数变化:
- 旧:--nginx
- 新:--webroot "${PROJECT_DIR}/frontend"
优点:
1. 不需要解析nginx配置文件
2. 直接利用已经配置好的HTTP服务器
3. 兼容性更好,成功率更高
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
137 KiB
137 KiB