问题原文
原帖链接 · Crypto Coupons · CC BY-SA 4.0
How can I make the certificate for vgo site to auto new every time so I don't have to renew it manual or it will auto renew itself?
ssl_certificate /etc/letsencrypt/live/www.site.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/www.vsite.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
add_header Strict-Transport-Security "max-age=31536000" always; # managed by Certbot
ssl_trusted_certificate /etc/letsencrypt/live/www.site.com/chain.pem; # managed by Certbot
ssl_stapling on; # managed by Certbot
ssl_stapling_verify on; # managed by Certbot
I have ubuntu, nginx btw and i am using letsencrypt
Edit: Like Gerald Schneider suggested having certbot installed on ubuntu auto renews by default how can I check this ?
root@ubuntu-s-1vcpu-1gb-amd-sfo3-01:~# certbot -v
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator nginx, Installer nginx
Which names would you like to activate HTTPS for?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: site.com
2: www.site.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel):
已采纳解答
原帖链接 · Gerald Schneider · CC BY-SA 4.0
If you installed certbot on Ubuntu as a regular package there is nothing you need to do, a systemd timer is installed automatically.
$ sudo apt install certbot python3-certbot-nginx
$ dpkg -L certbot |grep systemd
/lib/systemd/system/certbot.service
/lib/systemd/system/certbot.timer
$ cat /lib/systemd/system/certbot.timer
[Unit]
Description=Run certbot twice daily
[Timer]
OnCalendar=*-*-* 00,12:00:00
RandomizedDelaySec=43200
Persistent=true
[Install]
WantedBy=timers.target
When you use the --nginx argument to get a certificate certbot knows that nginx has to be reloaded after renewals and does so automatically.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
