网站登录界面html深圳市宝安区邮政编码
2026/2/5 3:22:56 网站建设 项目流程
网站登录界面html,深圳市宝安区邮政编码,沈阳住房建设局网站,承包装修工程平台本文详细记录了在腾讯云环境下#xff0c;通过 Certbot 获取和续期 Let’s Encrypt 通配符证书的完整流程#xff0c;包括 DNS API 配置、通配符证书申请、常见错误及解决方案。 1️⃣ 安装 Certbot 在 Ubuntu 系统中#xff0c;推荐使用官方 PPA#xff1a; sudo apt up…本文详细记录了在腾讯云环境下通过Certbot获取和续期Let’s Encrypt通配符证书的完整流程包括 DNS API 配置、通配符证书申请、常见错误及解决方案。1️⃣ 安装 Certbot在 Ubuntu 系统中推荐使用官方 PPAsudoaptupdatesudoaptinstallcertbot python3-certbot-dns-tencentcloud -ycertbot核心工具python3-certbot-dns-tencentcloud用于通过腾讯云 DNS API 获取通配符证书确认安装成功certbot --version2️⃣ 配置腾讯云 DNS API 凭证在腾讯云控制台创建API 密钥登录 腾讯云 API 密钥管理记录SecretId和SecretKey在服务器上创建凭证文件mkdir-p /root/.secrets/certbotvim/root/.secrets/certbot/tencentcloud.ini内容示例# 腾讯云 API 凭证 dns_tencentcloud_secret_id YOUR_SECRET_ID dns_tencentcloud_secret_key YOUR_SECRET_KEY修改权限防止其他用户读取chmod600/root/.secrets/certbot/tencentcloud.ini3️⃣ 申请通配符证书使用 TencentCloud DNS 插件申请证书certbot certonly\--dns-tencentcloud-credentials /root/.secrets/certbot/tencentcloud.ini\--dns-tencentcloud-propagation-seconds60\-d xunhuawenyou.cn\-d*.xunhuawenyou.cn操作说明certonly只获取证书不自动配置 Nginx--dns-tencentcloud-credentialsAPI 凭证文件路径--dns-tencentcloud-propagation-secondsDNS 记录生效等待时间-d指定域名可包含通配符⚠️ 常见交互如果已有 RSA 证书会提示是否升级为 ECDSAUpdate key type/(K)eep existing key type: U选择U。如果已有证书部分域名相同会提示是否扩展证书Do you want to expand and replace this existing certificate? (E)xpand/(C)ancel: E选择E扩展。4️⃣ 常见问题及解决方案4.1 DNS API 授权失败报错示例Error communicating with the DNSPOD API: http error status: 401原因API 密钥错误使用了错误的 DNS 产品腾讯云 DNS vs DNSPod解决方法确认凭证文件内容正确确认域名在腾讯云 DNS 上托管文件权限为 6004.2 Nginx 配置导致续期失败报错示例nginx: [emerg] open() /var/log/nginx/xunhuawenyou.cn/access.log failed (2: No such file or directory)解决方法确认 Nginx 配置文件正确确保日志路径存在或切换 DNS 验证方式5️⃣ 检查证书与文件路径证书生成成功后路径证书文件/etc/letsencrypt/live/xunhuawenyou.cn/fullchain.pem 私钥文件/etc/letsencrypt/live/xunhuawenyou.cn/privkey.pem 证书有效期至 2026-04-30注意使用通配符证书必须 DNS 验证。6️⃣ 自动续期Certbot 默认安装后会创建systemd timer自动续期。检查定时任务systemctl list-timers|grepcertbot手动测试续期sudocertbot renew --dry-run输出示例Simulating renewal of an existing certificate for xunhuawenyou.cn and *.xunhuawenyou.cn Congratulations, all simulated renewals succeeded⚠️ 注意事项如果不再使用的域名可以删除对应的 renewal 配置sudorm/etc/letsencrypt/renewal/huaxianguan.com.conf确保 DNS API 密钥有效续期才会成功7️⃣ 总结在腾讯云使用 Certbot 获取通配符证书必须使用 DNS API 插件生成证书前需创建凭证文件并设置 600 权限成功申请后系统会自动创建定时任务续期定期用--dry-run检查续期情况不再使用的域名可以删除对应的 renewal 文件避免续期错误

需要专业的网站建设服务?

联系我们获取免费的网站建设咨询和方案报价,让我们帮助您实现业务目标

立即咨询