acme

 

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 

     

     

 

posted @   ascertain  阅读(311)  评论(0编辑  收藏  举报
编辑推荐:
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律
点击右上角即可分享
微信分享提示