Failed to renew certificate keto-programs.com with error: Unable to find a virtual host listening on port 80

Hi,

I got this error on 2 virtual hosts on the same server at the same time.

I had installed Varnish but deleted it again, so I suspect it might be the reason why, I just can't find the fix.

Thanks!

1 Like

When you opened this thread in the Help section, you should have been provided with a questionnaire. Maybe you didn't get it somehow (which is weird), or you've decided to delete it. In any case, all the answers to this questionnaire are required:


Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. crt.sh | example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:

I ran this command:

It produced this output:

My web server is (include version):

The operating system my web server runs on is (include version):

My hosting provider, if applicable, is:

I can login to a root shell on my machine (yes or no, or I don't know):

I'm using a control panel to manage my site (no, or provide the name and version of the control panel):

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot):

3 Likes

Sorry about that.

1 Like

That's rather old. Maybe not related to your issue, but you might want to consider switching to the recommended installation method using snap at Certbot Instructions | Certbot. It says Ubuntu 20, but is also valid for 22. (They STILL haven't managed to update the instruction generator even though it was brought to the Certbot teams attention almost 2 years ago..)

Please show the output of:

sudo apachectl -t -D DUMP_VHOSTS
2 Likes

[Sat Mar 02 10:31:03.153591 2024] [so:warn] [pid 2698:tid 140686274303872] AH01574: module headers_module is already loaded, skipping
VirtualHost configuration:
*:443 is a NameVirtualHost
default server www.a-c-d.net (/etc/apache2/sites-enabled/a-c-d.net-le-ssl.conf:2)
port 443 namevhost www.a-c-d.net (/etc/apache2/sites-enabled/a-c-d.net-le-ssl.conf:2)
alias a-c-d.net
port 443 namevhost www.keto-programs.com (/etc/apache2/sites-enabled/keto-programs.com-le-ssl.conf:2)
alias keto-programs.com
*:8080 is a NameVirtualHost
default server www.a-c-d.net (/etc/apache2/sites-enabled/a-c-d.net.conf:1)
port 8080 namevhost www.a-c-d.net (/etc/apache2/sites-enabled/a-c-d.net.conf:1)
alias a-c-d.net
port 8080 namevhost www.keto-programs.com (/etc/apache2/sites-enabled/keto-programs.com.conf:1)
alias keto-programs.com

So you have your HTTP sites running on port 8080, which is not compatible with the http-01 challenge originally used to get the certificate (requires port 80). Which was also specified by the error message.

Is there a reason why you're using port 8080 instead of port 80?

4 Likes

Thanks, man! :smiley:

I am a little confused once in a while. I changed the ports back to port 80 and renewed the certs. And now they work again.

Thanks!

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.