let's encrypt certificate renew after expiration

Andrea Dragotta picture Andrea Dragotta · Aug 22, 2016 · Viewed 8.7k times · Source

I'm having issues trying to renew a recently expired certificate issued with let's encrypt. I tried launching the following commands:

./letsencrypt-auto renew

and

sudo ./letsencrypt-auto certonly --text --agree-tos --email [email protected] --renew-by-default --webroot --webroot-path /home/lovegistics -d lovegistics.it

which was the code I used to issue the certificate. Both of the command said that the certificate was succesfully renewed/issued, but it still gives me unsecure connection. Since I was on WHM, I took a look on the manage SSL page, and it says that the certificate has actually expired yesterday.

The output for the second command:

IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at
  /etc/letsencrypt/live/lovegistics.it/fullchain.pem. Your cert will
  expire on 2016-11-20. To obtain a new or tweaked version of this
  certificate in the future, simply run letsencrypt-auto again. To
  non-interactively renew *all* of your certificates, run
  "letsencrypt-auto renew"

I'm sorry, but I lost the output for the first one. Strangely, when I try to relaunch the renew command, it says that the certificates are not due for renewal yet.

How can I renew this certificate?

Thank you all in advance for your help.

EDIT: I restarted the web server (Apache) after each of these commands

Answer

Andrea Dragotta picture Andrea Dragotta · Dec 12, 2016

Finally I managed to solve my problem. The certificates were created successfully, but since I was on a CPanel server, they must be installed. In the following link there is an explanation directly from the cpanel team with a pearl code to copy-paste and execute when you have generated the certificate.

cpanel forum explanation

Happy coding!