Problem installing LE with Certbot on Centos7/Apache -> Vhosts issue?


i am trying to install LE on my vps server and when i run

certbot --apache

This is what i get:

No vhost exists with servername or alias of: (or it’s in a file with multiple vhosts, which Certbot can’t parse yet). No vhost was selected. Please specify ServerName or ServerAlias in the Apache config, or split vhosts into separate files.
Falling back to default vhost *:443…
Waiting for verification…
Cleaning up challenges
Failed authorization procedure. (tls-sni-01): urn:acme:error:connection :: The server could not connect to the client to verify the domain :: Error getting validation data


I have spent some time looking around here to find a solution, i found a few people with similar problem but none of the solution suggested worked out.

As far as my knowledge goes(not much) it seems to be that multiple vhosts are defined in the conf file. I have seen suggestion about splitting vhosts in multiple files etcc… but. It seems that i have no vhosts defined at all.

When i run

apachectl -S

to check the vhosts configuration, here is what i got:

[root@server01 ~]# apachectl -S
VirtualHost configuration:
ServerRoot: "/etc/httpd"
Main DocumentRoot: “/var/www/html"
Main ErrorLog: “/etc/httpd/logs/error_log"
Mutex proxy: using_defaults
Mutex authn-socache: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir=”/run/httpd/” mechanism=default
Mutex mpm-accept: using_defaults
Mutex authdigest-opaque: using_defaults
Mutex proxy-balancer-shm: using_defaults
Mutex rewrite-map: using_defaults
Mutex authdigest-client: using_defaults
Mutex ssl-stapling: using_defaults
PidFile: "/run/httpd/"
User: name=“apache” id=48
Group: name=“apache” id=48
[root@server01 ~]#

Not really sure about what to do next. I have a conf file at /etc/httpd/conf/httpd.conf and no ssl.conf i can find, if thats anything that matter.

Anyone a bit more experienced can help me out to get LE installed and to get me to enjoy the https:// on my site?

Thanks in advance :slight_smile:

Ok, ive got to solve it by myself :slight_smile:

For some reason i have got no ssl.conf in my /etc/httpd/conf.d folder so what i did is to reinstall mod_ssl.

yum reinstall mod_ssl

doing that created the ssl.conf in the folder and no more “No vhosts exists” error.

Just in case someone got the same problem.

Now i’ve got another issue but i am one step forward lol

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