非docker 使用 certbot 续签证书
发表于:2025-04-09浏览:134次TAG:
## 安装 certbot
```
apt install certbot
或者
yum install certbot
```
## 配置 nginx
```
location ~ /.well-known {
allow all;
root /var/www/html/example.com/;
}
ssl_certificate /etc/letsencrypt/live/zyhyc.cn/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/zyhyc.cn/privkey.pem;
```
## certbot续签
```
certbot certonly --webroot --email wu*****@163.com -w /opt/*****/public -d www.*****.cn
```
## nginx 配置生效
```
./sbin/nginx -s reload
```