No vhost exists with servername or alias of. Can't find .conf file


My domain

I ran this command: ./certbot-auto --apache

It produced this output: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.

My operating system is (include version):CentOS 6 64

My web server is (include version):Server version: Apache/2.2.31 (Unix)

My hosting provider, if applicable, is: VPS

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):kolox-mr

[root@vps etc]# apachectl -S
VirtualHost configuration:
wildcard NameVirtualHosts and default servers:
*:443 is a NameVirtualHost
default server default (/home/apache/conf/defaults/_default.conf:92)
port 443 namevhost default (/home/apache/conf/defaults/_default.conf:92)
port 443 namevhost cp (/home/apache/conf/defaults/cp.conf:82)
port 443 namevhost disable (/home/apache/conf/defaults/disable.conf:82)
port 443 namevhost (/home/apache/conf/domains/
port 443 namevhost webmail (/home/apache/conf/webmails/webmail.conf:82)
*:80 is a NameVirtualHost
default server default (/home/apache/conf/defaults/_default.conf:5)
port 80 namevhost default (/home/apache/conf/defaults/_default.conf:5)
port 80 namevhost cp (/home/apache/conf/defaults/cp.conf:5)
port 80 namevhost disable (/home/apache/conf/defaults/disable.conf:5)
port 80 namevhost (/home/apache/conf/domains/
port 80 namevhost webmail (/home/apache/conf/webmails/webmail.conf:5)
Syntax OK

The problem is I can’t locate the config file, please help



Hi @xx7879,

Is it possible that the file contains more than one VirtualHost?


No VirtualHost tag in /etc/httpd/conf/httpd.conf.

I finally find the config file at: /home/apache/conf/domains/
After removal of the VirtualHost tag group for port 80, I can install cert with ./certbot-auto.

I choise reinstall https for Showed me successful, no error msg.
After reboot, I checked the cert, here is the info:

DNS resolves to

HTTP Server Header: Apache/2.2.31 (CentOS)

SSL certificate

Common Name = *
Issuer = *
Serial Number = 00
SHA1 Thumbprint = 97B82409BCFC62B33E2BB04E60300BA0FB1190D1
Key Length = 1024
Signature algorithm = MD5 + RSA (bad)
Secure Renegotiation: Supported
SSL Certificate uses a deprecated signature hash

MD5 certificates should be replaced with SHA2 certificates as soon as possible to protect against increasingly effective MD5 attacks

For additional help, visit our SHA2 migration guide

SSL Certificate uses a weak public key

RSA keys should be at least 2048 bits

SSL Certificate has not been revoked

OCSP Staple: Not Enabled
OCSP Origin: Not Enabled
CRL Status: Not Enabled

SSL Certificate is expired.

The certificate was valid from 24/Feb/2006 through 24/Feb/2007.

Certificate does not match name

Subject *
Valid from 24/Feb/2006 to 24/Feb/2007
Issuer *
SSL Certificate is not trusted

What’s the problem?
Thanks for any advice.


That is a different certificate (ten years expired!) that exists somewhere on your system that’s getting served instead of the Let’s Encrypt certificate.

I think we could use help from someone more knowledge about Apache. There may also be problems associated with using the control panel (kolox-mr?) while trying to edit the configuration files yourself. Sometimes that can produce conflicting changes.


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