The certificate is expired, I renewed it but it’s still if I visit the site it says “Not secure” certificate is expired. I restarted the server but still same issue.
My domain is: private api
I ran this command: #sudo openssl x509 -in /etc/letsencrypt/live/api.example.net/cert.pem -text -noout
Validity
Not Before: Jan 31 14:31:17 2018 GMT
Not After : May 1 14:31:17 2018 GMT
You can run certbot certificates to get a summary of all of the certificates that are installed and their expiration dates.
One possibility that comes to mind is that you might have specified a slightly different set of domain names in your certificate request when you obtained the original certificate and when you obtained the new certificate. In that case, one of them would be in /etc/letsencrypt/live/api.example.net-0001 or something similar to that because they would be managed as separate certificates. This has often confused users because they ended up with separate certificates without necessarily intending to, and of course their web server software was pointed at only one of the certificates.
Another possibility is that your web server is configured to point at something other than the auto-updated version in live; for example, if it’s pointed at the static version in archive, or at a copy that you made with cp, then it would still serve the old certificate even though a newer one is present.
sudo ./certbot-auto certificates
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Found the following certs:
Certificate Name: api.example.net
Domains: api.example.net
Expiry Date: 2018-05-01 14:31:17+00:00 (VALID: 87 days)
Certificate Path: /etc/letsencrypt/live/api.example.net/fullchain.pem
Private Key Path: /etc/letsencrypt/live/api.example.net/privkey.pem
I think it found only one certificate, and already checked the /etc/letsencrypt/live, only one folder exists.
Blockquote Another possibility is that your web server is configured to point at something other than the auto-updated version in live; for example, if it’s pointed at the static version in archive, or at a copy that you made with cp, then it would still serve the old certificate even though a newer one is present.
How can I make sure I'm not doing this?
Sometimes I got this error when run letsencrypt commands , not sure if it's related to the issue I'm having
Failed to find executable apache2ctl in PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin