SSL证书过期修复实战:从手动模式到自动续期的完整解决方案

问题背景 今天发现网站 ruyueshuke.com 无法正常访问,浏览器提示SSL证书错误。经过排查,发现证书已经过期约1个月(过期时间:2025年12月29日),而服务器上明明配置了自动续期任务,为什么没有自动续期成功呢? 问题诊断 1. 检查证书状态 首先使用 openssl 命令检查证书的有效期: openssl s_client -connect ruyueshuke.com:443 -servername ruyueshuke.com </dev/null 2>/dev/null | openssl x509 -noout -dates 输出结果: notBefore=Sep 30 01:29:45 2025 GMT notAfter=Dec 29 01:29:44 2025 GMT 结论:证书确实已过期(过期日期:2025-12-29,当前日期:2026-01-29)。 2. 查找证书管理工具 登录服务器后,发现使用的是 acme.sh 而不是常见的 certbot: which certbot # 未找到 which acme.sh # /root/.acme.sh/acme.sh 3. 检查证书列表 /root/.acme.sh/acme.sh --list 输出: Main_Domain KeyLength SAN_Domains CA Created Renew ruyueshuke.com "ec-256" no LetsEncrypt.org 2025-09-30T02:28:18Z 2025-11-28T02:28:18Z 关键发现: 证书创建时间:2025-09-30 应该续期时间:2025-11-28 但实际并未续期成功 4. 检查自动续期配置 crontab -l | grep acme 输出: ...

2026-01-29 · maneng

如约数科科技工作室

浙ICP备2025203501号

👀 本站总访问量 ...| 👤 访客数 ...| 📅 今日访问 ...