使用 Acme.sh 申请 https 证书
使用 Acme.sh 申请 https 证书
Intro
Steps
安装 Acme.sh
下载并安装 acme.sh
,设置别名 acme.sh 以更方便的使用
curl https://get.acme.sh | sh
# alias acme.sh=~/.acme.sh/acme.sh
配置 DNS AccessKey 信息
我的域名在阿里云上,就以阿里云为例子,将下面的 Key 和 Secret 替换成自己实际的 Key 和 Secret
export Ali_Key="111111"
export Ali_Secret="222222"
申请证书
申请泛域名证书,泛域名证书需要指定两个 domain,如下面的示例:
acme.sh --issue --dns dns_ali -d *.weihanli.xyz -d weihanli.xyz
执行之后可以看到类似下面的输出,最后看到 Cert Success 就代表证书生成成功了
Reference
- https://www.jianshu.com/p/7b7113903cff
- https://github.com/acmesh-official/acme.sh