I ran this command: cd /opt/letsencrypt && /sbin/service httpd stop && ./letsencrypt-auto certonly --standalone --renew-by-default -d weight-loss-center.net -d www.weight-loss-center.net && /sbin/service httpd start
It produced this output:
No output. The certificate appears to have renewed because when I run /opt/letsencrypt/letsencrypt-auto renew the output says The following certs are not due for renewal yet: /etc/letsencrypt/live/weight-loss-center.net/fullchain.pem expires on 2019-09-11 Which is, indeed, three months from the date of renewal. BUT, when I visit the weight-loss-center.net website and click the padlock icon to review the cert info, it still shows a three month period starting in April and ending in June. That is not what I expect. I expect to see a three month period starting in June and ending in September.
My web server is (include version): Server version: Apache/2.4.39 (cPanel) Server built: May 30 2019 20:14:04
The operating system my web server runs on is (include version): CentOS release 6.10 (Final)
My hosting provider, if applicable, is:
Handy Networks
I can login to a root shell on my machine (yes or no, or I donāt know): Yes
Iām using a control panel to manage my site (no, or provide the name and version of the control panel): No
The version of my client is (e.g. output of certbot --version or certbot-auto --version if youāre using Certbot):
Iām currently unable to determine the version. When I try to get the version using the certbot-auto --version command, I get the following error: [root@server letsencrypt]# pwd /opt/letsencrypt [root@server letsencrypt]# ls -las certbot-auto 68 -rwxr-xr-x 1 root root 68023 Jun 12 21:37 certbot-auto [root@server letsencrypt]# certbot-auto --version -bash: certbot-auto: command not found
Occasionally Iāve noticed that browsers donāt immediately pull the newest cert, especially when the stored cert is still valid. Iām getting your old cert when I hit your site though
About the certbot version, can you try certbot --version?
Edit:
Overlooked the --standalone flag in the question, @JuergenAuerās answer should fix it
Here is the output of the ./letsencrypt-auto -d weight-loss-center.net -d www.weight-loss-center.net command:
`[root@server letsencrypt]# ./letsencrypt-auto -d weight-loss-center.net -d www.weight-loss-center.net
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Cert not yet due for renewal
You have an existing certificate that has exactly the same domains or certificate name you requested and isnāt close to expiry.
(ref: /etc/letsencrypt/renewal/weight-loss-center.net.conf)
What would you like to do?
1: Attempt to reinstall this existing certificate
2: Renew & replace the cert (limit ~5 per 7 days)
Select the appropriate number [1-2] then [enter] (press ācā to cancel): 2
Renewing an existing certificate
Deploying Certificate to VirtualHost /etc/apache2/conf/httpd.conf
Deploying Certificate to VirtualHost /etc/apache2/conf/httpd.conf
Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
1: No redirect - Make no further changes to the webserver configuration.
2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if youāre confident your site works on HTTPS. You can undo this
change by editing your web serverās configuration.
Select the appropriate number [1-2] then [enter] (press ācā to cancel): 2
Failed redirect for weight-loss-center.net
Unable to set enhancement redirect for weight-loss-center.net
Unable to find corresponding HTTP vhost; Unable to create one as intended addresses conflict; Current configuration does not support automated redirection
IMPORTANT NOTES:
We were unable to set up enhancement redirect for your server,
however, we successfully installed your certificate.
Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/weight-loss-center.net/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/weight-loss-center.net/privkey.pem
Your cert will expire on 2019-09-11. To obtain a new or tweaked
version of this certificate in the future, simply run
letsencrypt-auto again with the ācertonlyā option. To
non-interactively renew all of your certificates, run
āletsencrypt-auto renewā`
So Iām guessing that soon I should see the cert expiring in September and not in July like it is now?
The version according to ./letsencrypt-auto --version is ./letsencrypt-auto --version
Ah. Now I see that it is expiring in September as I intended. So my final question is, how do I make this happen automatically. I thought that by putting this:
0 0 1 * * /opt/letsencrypt/letsencrypt-auto renew
into crontab that it would do the job each month so I could just stop thinking about it. But it hasnāt been renewing each month as I thought it would. Do I instead use ./letsencrypt-auto -d weight-loss-center.net -d www.weight-loss-center.net in the crontab entry?
Unless configured otherwise, the renew command only renews certificates that need to be renewed -- by default, those that will expire in less than 30 days.
It's suggested to run it twice a day at random times of the day, to even out the server load, and so that one transient failure won't lead to your certificate expiring.
Iām still experiencing problems with this certificate. I thought it had renewed back in June when I did the renewal process described in this thread. But it expired today. I just ran the renewal process again and now there is a new expire date of October 2019. However, weight-loss-center.net still reports the old certificate. I canāt figure out why it isnāt working. Can you help?
I have no idea, either. I had been using https://zerossl.com/free-ssl to generate these and was attempting to automate things by installing LE as root on the server, but apparently that creates a whole other setup that my hosting is unable to detect at all. Iām just going to have to use https://zerossl.com/free-ssl forever, I guess. I wish this stuff was easier than this.
Yes. LiteSpeed must be the web server that WHM is handling certs for when I do this renewal manually through the WHM console. When I do it at the command line, it seems to be doing it using Apache. So, WHM is not showing me that cert when I try to select it in WHM. WHM has some AutoSSL renewal feature, but it doesnāt seem to be set up or working correctly.