How to resolve: "Please add a virtual host for port 80"

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., 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:

Crosstrek:~ zzzz$ sudo certbot --apache

It produced this output:

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.

My web server is (include version):

MAMP Pro 5.7 - using Apache

The operating system my web server runs on is (include version):
MacOS High Sierra 10.13.6 (17G12034)

My hosting provider, if applicable, is:

my machine, on my desk in front of me

I can login to a root shell on my machine (yes or no, or I don’t know):
I am the admin and have run the Certbot install commands up to the point of the one listed above in Terminal.

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

Yes, MAMP Pro 5.7

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

certbot 1.3.0

Website works and can connect via HTTP and HTTPS. Firewall set to listen on ports 80, 443

1 Like

Perhaps it would be better if certbot would work without a virtualhost, but do you have a reservation against just wrapping the important directives around a <VirtualHost> section to your Apache configuration?

1 Like


Thanks, but I’m really not sure what you’re asking. All I am trying to
do is get a cert, and I get the error in the process. I use MAMP Pro for MacOS specifically because I don’t want to get into the minutiae of Apache configuration. That said, “wrapping the important directives around a …” doesn’t really give me any actionable information.

What, specifically can I edit, copy, delete, change <etc.> to fix the error that is generated by Certbot?

Thank you.

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