Cannot find virtual host listening on port 80 and/or cannot bind to IPv4

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. https://crt.sh/?q=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: applemdm.paristexas.gov

I ran this command: sudo certbot certonly --apache

It produced this output: unable to find a virtual host listening on port 80

My web server is (include version): Mac OS Server

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

My hosting provider, if applicable, is: self? Rent an instance on Macstadium

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): 1.7.0

going on 14 hours into this - using standalone I get cannot bind to IPv4 or 6. using --apache I get unable to find virtual host

I am running Apple Web Server, so there is always a response from Port 80 - I don’t know what CERTBOT is looking for on port 80. I was able to create the folder .well-known/acme-challenge/ successfully, but I have racked my brain to find out what “challenge files” or “Token” it wants put in that folder.

Hi @rgthrasher

please create a working port 80 vHost with your domain name.

Your Apache has a documentation how to do that.

1 Like

Thanks, but I have no Apache documentation. I am not even positive it is apache. Not a Macos person at all but have tasked to fix it. I have Apple Server installed - Websites is ON -I have attached screenshot.

1 Like

I don’t know if Certbot works with that configuration.

May be you should select another client:

Or ask in an Apple-specific forum.

Or check, if there is a tutorial how to install a Letsencrypt certificate with that “visual webserver”.

Certbot normally requires raw config file access.

But your menu is like a control panel software. Normally, the combination of a control panel (that controls the webserver and the config files of the webserver) and such clients like Certbot is a really bad idea.

1 Like

I have been using LetEncrypt for almost 2 years, but its expiring at 5pm today and nothing I can do will renew it. So I ended up deleting the cert last night at 2am and was going to just start from scratch getting a new one, but I guess I don’t know how to do that either because all I get are those errors. I installed HomeBrew, then installed Certbot, and read every help blog I can and cannot change the outcome. I can turn the webserver off easily - then tried certbot as a standalone spinup, thats when i get the cannot bind - when I turn the webserver back on, it says cannot find listening on port 80. All the posts about making a virtual listening host are so technical and never really tells me how to do it. Something changed with LetEncrypt in the last few months. I would do the DNS challenge but I don’t know how to make it use DNS rather than HTTP challenge…

1 Like

1 Like

sudo certbot --apache

1 Like

And the webserver is definitely serving the hidden folder
applemdm.paristexas.gov/.well-known/acme-challenge/default.html

1 Like

I have had Lets Encrypt - expiring today

I would be happy to pay anyone more experienced to be able to correct this problem today

1 Like

Used DNS Challenge and was able to renew with a DNS txt record

But alas, the webserver sees the cert, but gives “Unable to use this cert” when trying to assign it

2 Likes

Found the solution to importing at

Then quit, and restart the Server App - chose the Letsencrypt cert and its done
Thanks for letting me talk out all of my trials and tribulations - perhaps someone else can find help with the info

3 Likes

DNS validation works always. But if your DNS provider doesn’t support an API, you have to do that manual.

That’s possible, but that’s not the idea using Letsencrypt.

Now you have 90 days to find a working solution. :+1:

In this forum the Apple-server users - aren’t existent. Specialized forums (same with Plesk, cPanel etc.) are always a good choice.

1 Like

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