这是一个超级简单的使用Let’s Excrypt签署泛域名证书的方法,比官方推荐的方案使用Certbot方便了许多,这也得益于acme.sh这一个轻量级项目。
项目主页:https://github.com/Neilpang/acme.sh
获取acme.sh
curl https://get.acme.sh | sh
使用阿里云自动部署dns验证
# 替换成从阿里云后台获取的密钥
export Ali_Key="[Your Ali_key]"
export Ali_Secret="[Your Ali_Secret]"
# 换成自己的域名
acme.sh --issue --dns dns_ali -d example.com -d *.example.com
Ali_Key可以从这里 获取
使用Docker
docker run --rm -it \
-v "$(pwd)/out":/acme.sh \
-e Ali_Key="xxxxxx" \
-e Ali_Secret="xxxx" \
neilpang/acme.sh --issue --dns dns_ali -d domain.cn -d *.domain.cn
本文仅提供快速部署方案,更多详细的帮助信息请移步https://github.com/Neilpang/acme.sh/wiki
全文完:)