Certbot verification fails

February 16, 2018 558 views
Apache LAMP Stack Let's Encrypt CentOS

Certbot returns the error:

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.

This is after a fresh install. I'm keeping it simple and not using any virtual hosts, etc. Just a few pages in the /var/www/html directory. httpd is enabled and I can access the website in my browser.

What am I doing wrong?

1 comment
1 Answer
kamaln7 MOD February 21, 2018
Accepted Answer

As far as I know, Certbot supports virtual hosts only, so it won't be able to proceed if you don't have any configured. Try adding a basic virtual host like so and see if that helps:

<VirtualHost *:80>
    DocumentRoot /var/www/html
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
Have another answer? Share your knowledge.