Centos 7 Install

I installed a Centos 7 minimal server then.

yum update

yum install epel-release

yum install httpd mod_ssl python-certbot-apache

systemctl restart httpd

The httpd server does work and I am serving files. I added no config changes to anything on this server. I simply added my html files too /var/www/html/ and no other changes.

I then tried this for my domain name.

certbot --apache -d MY_DOMAIN_HERE

I keep getting this.

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.

I am able browse to MY_DOMAIN from Internet etc. on both http and https self signed. This is a very bare Centos 7 minimal install with no real changes except listed above.

Any ideas?


Do you setup any virtual Hosts by any chance?

That's different... Have able to access via domain / IP address just means that apache is working, it doesn't means apache has been set up..

Please take a look at this tutorial: How To Secure Apache with Let's Encrypt on CentOS 7 | DigitalOcean

Thank you

That is the tutor I followed. I have actually setup two other Centos 7 servers over the last year or so following that website. I have no virtual hosts. I want this machine to only host this single sub domain.


If you don’t have any vHost currently setup, you may not want to use certbot Apache since it would always want to find a vHost in apache.

Please use certbot certonly to obtain an certificate only. (It will not install to Apache since that’s certonly)

Thank you

I think a better solution would be to set up your single domain as a vhost - this isn’t abnormal.


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