acme.sh 安装 Let’ s Encrypt 通配符证书
export Ali_Key="xxxxxxx"
export Ali_Secret="xxxxxxx"
curl https://get.acme.sh | sh
source ~/.bashrc
~/.acme.sh/acme.sh --issue --dns dns_ali -d linhongxu.com -d *.linhongxu.com
生成好的文件
Your cert is in /root/.acme.sh/linhongxu.com/linhongxu.com.cer
Your cert key is in /root/.acme.sh/linhongxu.com/linhongxu.com.key
The intermediate CA cert is in /root/.acme.sh/linhongxu.com/ca.cer
And the full chain certs is there: /root/.acme.sh/linhongxu.com/fullchain.cer
acme.sh --installcert -d linhongxu.com \
--key-file /etc/ssl/acme/linhongxu.com.key \
--fullchain-file /etc/ssl/acme/linhongxu.com.crt \
--reloadcmd "service nginx force-reload"
nginx里配置
ssl_certificate /etc/ssl/acme/linhongxu.com.crt;
ssl_certificate_key /etc/ssl/acme/linhongxu.com.key ;