Unable to find a virtual host listening on 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. 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:
micheleandkeith.com

I ran this command:
sudo certbot --apache

It produced this output:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Enter email address (used for urgent renewal and security notices) (Enter ‘c’ to
cancel): kapix@me.com


Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must
agree in order to register with the ACME server at
https://acme-v02.api.letsencrypt.org/directory


(A)gree/©ancel: A


Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let’s Encrypt project and the non-profit
organization that develops Certbot? We’d like to send you email about our work
encrypting the web, EFF news, campaigns, and ways to support digital freedom.


(Y)es/(N)o: Y
No names were found in your configuration files. Please enter in your domain
name(s) (comma and/or space separated) (Enter ‘c’ to cancel): micheleandkeith.com
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for micheleandkeith.com
Cleaning up challenges
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.

IMPORTANT NOTES:

  • Your account credentials have been saved in your Certbot
    configuration directory at /etc/letsencrypt. You should make a
    secure backup of this folder now. This configuration directory will
    also contain certificates and private keys obtained by Certbot so
    making regular backups of this folder is ideal.

My web server is (include version):
Apache (version unknown

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

My hosting provider, if applicable, is:
Locally hosted

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):
certbot 1.2.0

Hi @kapixisrm,

Do you have an existing Apache virtual host for your HTTP site on port 80? Which Apache configuration file is it located in?

Hi schoen,

I don’t know if there is an existing Apache virtual host for my HTTP site on port 80.

If there is, I didn’t put it there. What is an Apache virtual host?

certbot --apache is meant to be used when you have an existing, working HTTP site with Apache. Then it will help you to create a working HTTPS site based on your existing HTTP site.

Virtual hosts are the way that sites are normally configured inside of Apache.

https://httpd.apache.org/docs/2.4/vhosts/index.html

If you don’t have any defined, maybe you are using a default Apache configuration for your site? Could you share your Apache configuration? It may be that certbot --apache doesn’t know how to deal with it because it isn’t set up according to the principles that Certbot expects Apache configurations to use.

I’m happy to share my Apache configuration. By that do you mean a dump of /private/etc/apache2/httpd.conf or the Apple version which I believe is different and elsewhere?

Btw, it’s Apache 2.4.33 in case that helps.

It’s possible that Certbot isn’t looking for it in the right place if the one that’s really being used by Apache isn’t in /etc. That’s where Certbot is expecting to find it.

I’m now re-installing the OS in order to have clean working environment. I’ve used this machine for so many ‘project’ over the years that it’s time to straighten it up.

Let’s close this topic and I’ll get back in touch if I need assistance.

Thanks for your time and help.

1 Like

Hi schoen,

I’ve decided to re-install the OS and start fresh since the server was filled with a professional amount of cruft.

I expect that I’ll go in a different direction now.

Thank you for the time you spent on my case,

Keith

1 Like

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