acme
Automatic Certificate Management Environment
HTTP方式
- 指定网站根目录来验证域名所有权,域名需解析到此主机,acme.sh会自动生成验证文件,放置到网站根目录,完成验证后,删除验证文件
acme.sh --issue --domain heuristic.ibm.io --webroot /data/www
- acme.sh可自动读取apache配置来完成验证,无需指定网站根目录
acme.sh --issue --domain heuristic.ibm.io --apache
- acme.sh可自动读取nginx配置来完成验证,无需指定网站根目录(反代也可)
acme.sh --issue --domain heuristic.ibm.io --nginx
- 没有部署web sever时,acme.sh可监听于80端口完成验证
acme.sh --issue --domain heuristic.ibm.io --standalone
- 以上都不会更改原有配置,ssl配置需手动
DNS方式
DNS需配置DNS解析记录,主机本身无需公网IP
DNS Manual
- 申请
acme.sh --issue --domain heuristic.51cjml.cn --dns --yes-I-know-dns-manual-mode-enough-go-ahead-please acme.sh --renew --domain heuristic.51cjml.cn --dns --yes-I-know-dns-manual-mode-enough-go-ahead-please acme.sh --renew --domain heuristic.51cjml.cn --dns --yes-I-know-dns-manual-mode-enough-go-ahead-please --force
- 测试解析是否生效
dig @8.8.8.8 -t txt _acme-challenge.heuristic.ibm.io
DNS Automatic
- 导出Key & Secret
export Ali_Key="LTAI4G5DeZ51DVkPNQpRzLC" export Ali_Secret="iTiUiDnGzs7OFqMjIr9YURuRy9RWr"
-
acme.sh --issue --domain heuristic.ibm.io --dns --dns_ali --force
利用acme.sh安装证书
acme.sh --install-cert --domain '*.ibm.io' \
--key-file /etc/nginx/ssl/server.key \
--fullchain-file /etc/nginx/ssl/server.cer \
--reloadcmd 'nginx -s reload'
常用参数
- 手动升级acme.sh
acme.sh --upgrade
- 自动升级
acme.sh --upgrade --auto-upgrade
-
acme.sh --list
-
acme.sh --cron --force
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律