核心内容摘要
Qwen3-0.6B支持中文视频吗?亲测结果来了
本文详细记录了在腾讯云环境下通过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️⃣
常见问题及解决方案
1 DNS API 授权失败报错示例Error communicating with the DNSPOD API: http error status: 401原因API 密钥错误使用了错误的 DNS 产品腾讯云 DNS vs DNSPod解决方法确认凭证文件内容正确确认域名在腾讯云 DNS 上托管文件权限为
6
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 证书有效期至
注意使用通配符证书必须 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⚠️