Virtual host setup necessary?

My domain is:

I ran this command: sudo certbot certonly --apache

It produced this output: Unable to find a virtual host listening on …

My web server is (include version): httpd-2.4.6-80.el7.centos.1.x86_64

The operating system my web server runs on is (include version): CentOS Linux release 7.5.1804 (Core)

My hosting provider, if applicable, is: i have physical access to the machine

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

I’m using a control panel to manage my site (no, or provide the name and version of the control panel): no a am doing all administration via SSH

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

The machine has a static IP-address and permanent DNS-entry

When visiting from outside i can see the well-known default welcome page, so the server is up and running on Port 80.

In my httpd.conf i have the main server configured with
Listen 80
DocumentRoot "/var/www/html"
set but no other Virtual Servers because i want the setup to be as simple as possible.

the full error text is:

http-01 challenge for
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.

Is it absolutely necessary to create a virtual host or is this another error hiding behind?


Hi @pgsellmann,

The --apache method does require that you have an existing HTTP virtual host for the name or names that you are going to request a certificate for. This virtual host is used as part of the way Certbot configures your web server.

Thank you, this was a very fast answer :slight_smile:

perhaps this requirement should be mentioned at the install page if someone selects ‘apache’ ?


1 Like

You might be interested in the webroot authenticator.

1 Like

Yes, perhaps the advice that we have at

is actually not specific enough to describe what Certbot expects in common use cases. I’ll ask my colleagues to think about that a little bit.

Works now as expected…


1 Like

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