Acme.sh签发Buypass及ZeroSSL证书的方法
curl https://get.acme.sh | sh
安装acme.sh脚本
ZeroSSL需要自行到官网申请API。
https://app.zerossl.com/developer
acme.sh --register-account --server zerossl --eab-kid 你的kid --eab-hmac-key 你的kid密匙
下面方法更简单
acme.sh --server https://api.buypass.com/acme/directory --register-account --accountemail domain@gmail.com
Buypass不需要进入官网申请账号,只需要下面一条命令即可注册
acme.sh --server https://api.buypass.com/acme/directory --register-account --accountemail 你的邮箱
注册成功会显示相关密匙
手动模式,需要自行到dns添加指向
Buypass证书签发
acme.sh --server https://api.buypass.com/acme/directory --issue -d 你的域名 --dns --yes-I-know-dns-manual-mode-enough-go-ahead-please
手动去DNS添加完,再次执行--renew即可签发证书。
Buypass证书更新
acme.sh --server https://api.buypass.com/acme/directory --renew -d 你的域名 --dns --yes-I-know-dns-manual-mode-enough-go-ahead-please
签发ZeroSSL证书
acme.sh --server zerossl --issue -d 你的域名 -d 第二个域名 --dns --yes-I-know-dns-manual-mode-enough-go-ahead-please
个人比较喜欢使用标准模式和dns API模式
acme.sh --server zerossl --issue --standalone -d domain.com
上面的--standalone模式必须确保你的域名正确指向你的服务器IP,并且没有任何80端口占用
acme.sh --server zerossl --issue --dns dns_cf -d domain.com
默认安装的证书是在root账号下,使用下面命令安装和复制证书到其它路径
--key-file /etc/ssl/demodomain.com.key.pem \
--fullchain-file /etc/ssl/demodomain.com.cert.pem