I am trying to renew my SSL certificate which is Let's Encrypt Authority X3 certificate.
When I hit this command via SSH
"sudo certbot renew --dry-run"
Then, the terminal throws the following error -
"Attempting to renew cert (weighinglab.com) from /etc/letsencrypt/renewal/weighinglab.com.conf produced an unexpected error: Unable to find a virtual host listening on port 80 which is currently needed for Certbot to prove to the CA that you control your domain. Please add a virtual host for port 80.. Skipping. All renewal attempts failed. The following certs could not be renewed: /etc/letsencrypt/live/weighinglab.com/fullchain.pem (failure)"
Your port 80 seems fine to me right now. Your redirects, on the other hand, have a problem. They go from http://www to https://www then back to http:// then back to https://.
You can have a perfectly working HTTP server without a virtual host: just a default host without even knowing about any hostname will do. It'll serve the same contents for every hostname provided by the HTTP Host header. But that doesn't work for the apache certbot plugin: it'll need a virtualhost to get the hostname(s) from, it'll need a virtualhost to install the certs in et cetera.
I got blocked from seeing the content in my browser due to the expired certificate. When I saw letsdebug return OK, I assumed that all was well on the far end of the redirect chain. That's my fault. I suppose this may be one of those cases where the error simply must be accepted as-is. Is there any way to confirm this error with an external tool (given that the cert is expired)?
Did you change your web server configuration (perhaps the configuration files /etc/apache2) significantly somehow after originally obtaining this certificate?
@rg305's suggestion of apachectl -S is helpful, although you might want to run that command with sudo for a more comprehensive output if you aren't running as root.
Please remember that --dry-run means to do a (realistic) test, and won't obtain or save a new certificate that can actually be used on your public web site.