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
© 著作权归作者所有
举报
发表评论
0/200