利用freessl免费生成https(https://freessl.cn/acme-deploy)
官网说明地址:https://blog.freessl.cn/acme-quick-start/
下载acme工具包
curl https://get.acme.sh | sh -s email=my@example.com
或者
curl https://gitcode.net/cert/cn-acme.sh/-/raw/master/install.sh?inline=false | sh -s email=my@example.com
下载后,acme目录再根目录下
执行命令
acme.sh --issue -d xxx.xxx.com --dns dns_dp --server https://acme.freessl.cn/v2/DV90/
5.生成在此目录下
部署生成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"
或者,直接将fullchain.cer文件改为cert.pem,xxx.com.key改为xxx.com.pem