网站使用Let's Encrypt
的免费证书,通过默认推荐的Certbot
自动配置。
Install
1 |
$ sudo apt-get install certbot python-certbot-nginx -t stretch-backports |
Get Started
自动配置nginx
。
1 |
$ sudo certbot --nginx |
或者
1 |
$ sudo certbot -a dns-plugin -i nginx -d "*.example.com" -d example.com --server https://acme-v02.api.letsencrypt.org/directory |
Automating renewal
首先测试是否可以更新。
1 |
$ sudo certbot renew --dry-run |
默认可以启用在systemd
中的certbot-renew.timer
自动更新定时器。