释放双眼,带上耳机,听听看~!
-
安装acme.sh:
curl https://get.acme.sh | sh
-
使用阿里云API来签发通配符证书:
export Ali_Key="Type_Your_Full_Key" export Ali_Secret="Type_Your_Full_Secret" acme.sh --issue --dns dns_ali -d example.com -d '*.example.com'
-
安装证书并重新加载Nginx配置:
acme.sh --install-cert -d example.com --key-file /path/to/keyfile/in/nginx/key.pem --fullchain-file /path/to/fullchain/nginx/cert.pem --reloadcmd "service nginx force-reload"
二、使用acme.sh更新/续签通配符证书(阿里万网,Root用户下操作)
-
更新acme.sh:
acme.sh --upgrade
-
更新/续签通配符证书:
acme.sh --issue --dns dns_ali -d example.com -d '*.example.com'
-
安装证书并重新加载Nginx配置:
acme.sh --install-cert -d example.com --key-file /path/to/keyfile/in/nginx/key.pem --fullchain-file /path/to/fullchain/nginx/cert.pem --reloadcmd "service nginx force-reload"