Misc Notes

HTTPS相关

HTTPS相关

SSL证书

Reference: https://letsencrypt.org/

通过 Certbot 来自动安装证书

先安装 snapd:

1
2
sudo apt update
sudo apt install snapd

再安装 Certbot:

1
2
3
4
5
6
7
8
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
# 自动配置nginx
sudo certbot --nginx
# 只下载证书
sudo certbot certonly --nginx
# 验证renew策略
sudo certbot renew --dry-run