安装 acme.sh
curl https://get.acme.sh | sh -s email=your-email@outlook.com
设置别名,方便使用:
alias acme.sh=~/.acme.sh/acme.sh
申请证书:
acme.sh --issue -d www.lwbj.cn --nginx
或
acme.sh --issue -d www.lwbj.cn --webroot /var/www/www.lwbj.cn
部署证书:
acme.sh --install-cert -d www.lwbj.cn --key-file /etc/nginx/ssl/www.lwbj.cn.key --fullchain-file /etc/nginx/ssl/www.lwbj.cn.pem --reloadcmd "service nginx force-reload"
删除证书:
acme.sh --remove -d www.lwbj.cn
删除后记得到 /root/.acme.sh/
目录下找到域名文件夹,一并删除。
官方文档:https://github.com/acmesh-official/acme.sh/wiki/%E8%AF%B4%E6%98%8E
发表回复