菜单 学习猿地 - LMONKEY

VIP

开通学习猿地VIP

尊享10项VIP特权 持续新增

知识通关挑战

打卡带练!告别无效练习

接私单赚外块

VIP优先接,累计金额超百万

学习猿地私房课免费学

大厂实战课仅对VIP开放

你的一对一导师

每月可免费咨询大牛30次

领取更多软件工程师实用特权

入驻
338
0

acme

原创
05/13 14:22
阅读数 13590

 

Automatic Certificate Management Environment

 

HTTP方式

  1. 指定网站根目录来验证域名所有权,域名需解析到此主机,acme.sh会自动生成验证文件,放置到网站根目录,完成验证后,删除验证文件
    acme.sh --issue --domain heuristic.ibm.io --webroot /data/www

     

  2. acme.sh可自动读取apache配置来完成验证,无需指定网站根目录
    acme.sh --issue --domain heuristic.ibm.io --apache

     

  3. acme.sh可自动读取nginx配置来完成验证,无需指定网站根目录(反代也可)
    acme.sh --issue --domain heuristic.ibm.io --nginx

     

  4. 没有部署web sever时,acme.sh可监听于80端口完成验证
    acme.sh --issue --domain heuristic.ibm.io --standalone

     

  5. 以上都不会更改原有配置,ssl配置需手动

 

DNS方式

DNS需配置DNS解析记录,主机本身无需公网IP

 

DNS Manual

  1. 申请
    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

     

  2. 测试解析是否生效
    dig @8.8.8.8 -t txt _acme-challenge.heuristic.ibm.io

     

 

 

DNS Automatic

  1. 导出Key & Secret
    export Ali_Key="LTAI4G5DeZ51DVkPNQpRzLC"
    export Ali_Secret="iTiUiDnGzs7OFqMjIr9YURuRy9RWr"

     

  2. 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'

 

 

常用参数

  1. 手动升级acme.sh
    acme.sh --upgrade

     

  2. 自动升级
    acme.sh --upgrade --auto-upgrade

     

  3. acme.sh --list 

     

     

  4. acme.sh --cron --force 

     

     

 

发表评论

0/200
338 点赞
0 评论
收藏