typora/note/devops/nginx/acme lets encrypt ssl证书.md

25 lines
585 B
Markdown
Raw Permalink Normal View History

2024-12-11 21:48:55 -05:00
### 安装acme.sh
```shell
curl https://get.acme.sh | sh -s email=xxxxxxxxxxxx@163.com
```
### 访问dns pod 拿到id和token
```shell
https://console.dnspod.cn/account/token/token
```
### 执行命令
```shell
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"
```