使用 acme.sh 自动更新 SSL 证书的指南

上篇文章讲了一下 如何利用acme.sh来申请ssl,但没有讲3个月到期后 如何续期,续期的时候会碰到什么问题?

1.查看当前的当前签发域名的到期时间

复制代码
acme.sh list

2.重新申请ssl

css 复制代码
 acme.sh --issue --dns dns_namesilo -d xxx.ai -d *.xxx.ai --dnssleep 900 --debug

执行之后报错

xml 复制代码
<namesilo>

<request>
<operation>listDomains</operation>
<ip>sss.xx.xx.xx</ip>
</request>
<reply>
<code>110</code>
<detail>Invalid API Key (Permission denied)</detail>
</reply>

</namesilo>

执行命令看看当前的key在那几个文件里面

bash 复制代码
[root@100 .acme.sh]# grep -rl "a9f7c7d2482b2e010e5767f66" .
./acme.sh.env
./dnsapi/dns_namesilo.sh
./account.conf

依次修改为新的key 然后在重新执行

css 复制代码
 acme.sh --issue --dns dns_namesilo -d xxx.ai -d *.xxx.ai --dnssleep 900 --debug

3.重启nginx,验证新证书是否生效

复制代码
nginx -s reload

访问网址,看看浏览器显示证书是否正常

相关推荐
一点程序1 天前
基于SpringBoot的选课调查系统
java·spring boot·后端·选课调查系统
怪兽源码1 天前
基于SpringBoot的选课调查系统
java·spring boot·后端·选课调查系统
csdn_aspnet1 天前
ASP.NET Core 中的依赖注入
后端·asp.net·di·.net core
昊坤说不出的梦1 天前
【实战】监控上下文切换及其优化方案
java·后端
疯狂踩坑人1 天前
【Python版 2026 从零学Langchain 1.x】(二)结构化输出和工具调用
后端·python·langchain
橘子师兄1 天前
C++AI大模型接入SDK—ChatSDK封装
开发语言·c++·人工智能·后端
@ chen1 天前
Spring事务 核心知识
java·后端·spring
一点技术1 天前
基于SpringBoot的选课调查系统
java·spring boot·后端·选课调查系统
RANCE_atttackkk2 天前
Springboot+langchain4j的RAG检索增强生成
java·开发语言·spring boot·后端·spring·ai·ai编程
好好研究2 天前
Spring Boot - Thymeleaf模板引擎
java·spring boot·后端·thymeleaf