2026-04-02 23:12:36 +08:00

34 lines
480 B
Markdown

---
title: Certbot配置nginx中ssl访问
createTime: 2023/05/08 13:00:12
tags:
- linux
- certbot
categories:
- 随记
---
`Ubuntu 22.04.01 LTS`为例
1. 安装 certbot
```bash
sudo apt list | grep certbot
sudo apt install certbot
sudo apt install python3-certbot-nginx
```
2. 配置 ssl 证书
```bash
sudo certbot --nginx
```
3. 配置自动更新证书
```bash
crontab -e
```
三个月更新一次:`0 0 1 3,6,9,12 * sudo certbot renew --force-renewal`