typora/note/devops/nginx/acme lets encrypt ssl证书.md
2024-12-12 10:48:55 +08:00

585 B

安装acme.sh

curl https://get.acme.sh | sh -s email=xxxxxxxxxxxx@163.com

访问dns pod 拿到id和token

https://console.dnspod.cn/account/token/token

执行命令

export DP_Id="xxxxx"
export DP_Key="xxxxxxxxxxxxxxxxxxxxxxx"
/root/.acme.sh/acme.sh --issue --dns dns_dp -d heysq.com -d igit.heysq.com --server letsencrypt
/root/.acme.sh/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"