SSL Certificate Name Mismatch CentOS 6.8

I am using CentOs 6.8 and have created a certificate for my website with certbot.

Certificate Name:
Certificate Path: /etc/letsencrypt/live/
Private Key Path: /etc/letsencrypt/live/

I set up the file /etc/httpd/conf.d/ssl.conf file:
ServerCertificateFile: /etc/letsencrypt/live/
ServerCertificateKeyFile: /etc/letsencrypt/live/
SSLCertificateChainFile: /etc/letsencrypt/live/

When I now go to my site like this: or
I still get a crossed out https (in chrome) and it tells me that this site isn’t secure.
I tried a ssl certificate checker with and and it tells me that:
Certificate name mismatch
Try these other domain names (extracted from the certificates):localhost

Anyone know how to fix this?
Thanks in advance :slight_smile:

Your real domain names would allow us to help you better (assuming isn’t your real domain).

My guess is that you include http content in your pages. Try using to test them.

My real domain name is

Thanks. You are using a self signed cert.

Have you restarted your webserver (nginx) since you edited your config ?

Also, the lines you have in the first post about the config look like apache config files, yet your webserver looks to be nginx … what is your setup ?

My server is running nginx, but i edited the httpd/conf.d/ssl.conf file. I assume that is wrong.
Should I try installing the ssl certificate with nginx?

Yes, httpd/conf.d/ssl.conf is an apache file usually not nginx.

If running nginx, then you need to modify the nginx config - can be useful in creating a suitable config.

1 Like

I have opened /etc/nginx/conf.d/ssl.conf file but it was empty. I don’t think that’s normal.
Do you think I could just copy the text from a config file on the internet, or is there another way to fix it?

I also have a file in my config folder called “wordpress_https.conf”. It also asks me for a certificate and key, like a normal config file, maybe try that one? Reinstalling nginx, with “sudo yum reinstall nginx”, doesn’t give me the default ssl config file.

I now have ssl on “” and “”. But when I now connect to my website I get a “Welcome to Nginx”-message. (On mobile only on, on I get an error message).
Any idea how to get my wordpress site back?

Now I have a 403 Forbidden Error. Time for a new Question.

Thanks for all the help, probably still wouldn’t know im running nginx without your help :slight_smile:

1 Like

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