First domain has error, 2nd works

My domain is: ,
apache on centos 7 on google cloud with root access
certbot 0.35.1 looks perfect
while gives 'Certificate name mismatch ’

I originally created flydubbo with a bad apache configuration file,
I deleted
& httpd-le-ssl.conf
then reran sudo certbot --apache

1 Like

Should be easy to fix, but first let us take a small inventory of what your current certificates and virtual hosts are:

sudo apachectl -t -D DUMP_VHOSTS
sudo certbot certificates

Once we know this, the optimal way to secure both domains will become more obvious.

1 Like

[root@flydubbo flydubbo]# sudo apachectl -t -D DUMP_VHOSTS
Passing arguments to httpd using apachectl is no longer supported.
You can only start/stop/restart httpd using this script.
If you want to pass extra arguments to httpd, edit the
/etc/sysconfig/httpd config file.
VirtualHost configuration:
*:80 is a NameVirtualHost
default server (/etc/httpd/conf/httpd.conf:160)
port 80 namevhost (/etc/httpd/conf/httpd.conf:160)
port 80 namevhost (/etc/httpd/conf/httpd.conf:171)
*:443 is a NameVirtualHost
default server (/etc/httpd/conf.d/ssl.conf:56)
port 443 namevhost (/etc/httpd/conf.d/ssl.conf:56)
port 443 namevhost (/etc/httpd/conf/httpd-le-ssl.conf:2)
port 443 namevhost (/etc/httpd/conf/httpd-le-ssl.conf:13)

[root@flydubbo flydubbo]# sudo certbot certificates
Saving debug log to /var/log/letsencrypt/letsencrypt.log

Found the following certs:
Certificate Name:
Expiry Date: 2019-10-23 14:06:51+00:00 (VALID: 86 days)
Certificate Path: /etc/letsencrypt/live/
Private Key Path: /etc/letsencrypt/live/

[root@flydubbo flydubbo]#

You have some duplicate virtual hosts:


That is what will be causing the self-signed issue.

One of those is properly configured with your Let’s Encrypt certificate, and the other one will have the self-signed certificate.

Take a look inside, figure out which file is the right one, and get rid of the other one. Seems like ssl.conf is probably the one you want to get rid of, but double-check!


thanks for the quick answer, makes sense
I corrupted the ssl.conf file and now apache wont start
so will be a while sorting that out before i know if i fixed it

1 Like

fix was
yum remove and reinstall

error was not having

ServerName something
<VirtualHost *:80>
ServerName somethingelse


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