网站证书,多域名统配证书自动更新(亲测)

  1. 安装acme.sh
curl https://get.acme.sh | sh -s email=my@example.com

wget -O -  https://get.acme.sh | sh -s email=my@example.com
  1. 设置alias (绝对路径)
alias acme.sh=~/.acme.sh/acme.sh 
  1. 申请namesilo dns api(别的请自行开启,有问题留言)

申请:https://www.namesilo.com/account_api.php
在ssh里输入
export Namesilo_Key="申请的key"

3、生成证书
namesilo

acme.sh --issue --dns dns_namesilo --dnssleep 900 -d gmloc.me -d *.gmloc.me
nginx

glmoc.me改成你的二级域名
等待验证

  1. 自动续签
    安装了ACME后,它会添加一个自动任务到你服务器的Cron里,每天都会检查你的证书是否快要过期,ACME会自动帮你续签。

强制续签证书:

acme.sh --renew -d example.com --force

查看定时任务的方法

crontab -l
posted @ 2024-08-21 11:24  学不会xuebuhui  阅读(123)  评论(0)    收藏  举报
Language: javascript //图片预览