ssl自动更新
使用Let‘s Encrypt 配置 Nginx SSL 证书是比较方便的
安装命令
shell
sudo apt update
sudo apt install certbot python3-certbot-nginx配置nginx
nginx
server {
listen 80;
server_name sunqm.com;
# 其他配置...
}获取证书
shell
sudo certbot --nginx -d sunqm.com配置自动续期
选择喜欢的编辑器增加以下内容,这将在每个月的第一天自动尝试续期证书。
shell
0 0 1 * * /usr/bin/certbot renew --quiet