For all websites this error was produced (with appropriate domain names!)…
" Attempting to renew cert (goldglamor.com) from /etc/letsencrypt/renewal/goldglamor.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"
I changed the following line in goldglamor.com.conf :
<VirtualHost *:443> to <VirtualHost *:80> and then <VirtualHost *:80 *:443>
I restarted Apache each time, but this did not help and I still got the same error.
Appreciate any detailed suggestions…
My web server is (include version):
Apache 2.4.6
The operating system my web server runs on is (include version):
Centos 7.6.1810
My hosting provider, if applicable, is:
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
That's really not the best way to so 80 and 443.
You should probably do them in separate config.
One for 80 (to handle the auth requests and redirect all 80 to 443)
One for 443 (to handle your web site traffic)
Change it back to original (*:443)
And show the file here.
#hashtags work fine by the way
<VirtualHost *:80>
ServerName goldglamor.com
ServerAlias www.goldglamor.com
Redirect permanent / https://www.goldglamor.com/
</VirtualHost>
to get renewal working again.
Edit: whoops, not sure where that .tk came from, removed
Originally I was using port 443, until this error “Unable to find virtual host listening on port 80” occurred. Definitely would prefer to user port 443 over port 80!
In the past, Certbot was probably validating using port 443 with the TLS-SNI-01 challenge type. But Let's Encrypt is phasing TLS-SNI-01 out, and Certbot recently switched to prefer using the port 80 HTTP-01 challenge in version 0.28.0 (though it still supports both for now).