[Solved] Certificate mismatch


For some reason, this domain is picking up the certificate for a different domain (which is the preceding one before it in the nginx conf sites-enabled directory). Where should I look to fix this?

My domain is:
I ran this command:
certbot-auto --nginx -d api.usermanagement.tgmgroup.net
It produced this output:
Seemed to work
My web server is (include version):
nginx 1.4.6
The operating system my web server runs on is (include version):
ubuntu 14.04
My hosting provider, if applicable, is:

I can login to a root shell on my machine (yes or no, or I don’t know):
I’m using a control panel to manage my site (no, or provide the name and version of the control panel):

Nginx conf file is here - https://pastebin.com/cAkNWAjf

Unable to set enhancement redirect

The pasted nginx configuration looks seriously broken to me.
Six server blocks for one domain name, four of them completely equal, no listen 443 ssl statement…


Thanks - I noticed the 443 and am putting it in now (I’m more used to Apache). I deleted the other replica blocks (I think certbot-auto keeps putting them in at the end).


I would check if nginx actually loads this file on startup.


It does. It has been running happily for 3 months (until the cert didn’t update).


I’ve added the listen 443 and ssl certificates in the server block and it’s working. Note to self - if certificate breaks, somehow other certificate gets served up.


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