Acme.sh是一个实现ACME客户端协议的纯Unix shell脚本,能够很方便帮我们生成Let’s Encrypt免费证书,其中单域名证书可以直接和相关的云结合像阿里云、腾讯云等,自动续费证书,泛域名证书没法直接集成,只提供90天服务,到期后需要手动重新生成。
文章目录
acme.sh
curl https://get.acme.sh | sh -s [email protected]
wget -O - https://get.acme.sh | sh -s [email protected]git clone https://github.com/acmesh-official/acme.sh.git
cd ./acme.sh
./acme.sh --install -m [email protected]acme.sh --issue -d "*." --dns \
--yes-I-know-dns-manual-mode-enough-go-ahead-please --server letsencryptacme.sh --renew -d "*." --dns \
--yes-I-know-dns-manual-mode-enough-go-ahead-please --logopenssl dhparam -out /etc/nginx/dhparam.pem 2048
mkdir /etc/nginx/cert/
acme.sh --install-cert -d *. \
--key-file /etc/nginx/cert//.key \
--fullchain-file /etc/nginx/cert//fullchain.cerssl_certificate /etc/nginx/cert//fullchain.cer;
ssl_certificate_key /etc/nginx/cert//.key;
include /etc/nginx/ssl-options.conf;
ssl_dhparam /etc/nginx/dhparam.pem;1、续费不成功
请使用root用户来执行
2、nginx访问不了
权限问题,重启nginx
3、域名配置TXT记录,解析不到
域名配置TXT需要10分钟之后才能生效,等待后重试