I'm using Let's encrypt to generate https certificate. This certificate is for 3 months.
The certificate is specified in Nginx:
listen [::]:443 ssl ipv6only=on;
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/mywebsite.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/mywebsite.com/privkey.pem;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
The certificate is auto renew each 3 months. To reload in Nginx, I just type service nginx reload, connected as root. Maybe there is something better.
I've tried to auto reload it in Nginx, with crontab -e as root, I added:
0 4 * * * service nginx reload
But it does nothing :-( I do not understand what I'm doing wrong...
My server is on Debian