Wrong SSL certificate loaded on 2nd domain

I’m stuck with a problem that the SSL certificate of the wrong domain is loaded.

I’ve setup a SSL certificate for my own domain, for example: AAA.com.
This certificate is requested through Comodo and has, as described through the admin, has been placed at the SSL root folder: /home/user-data/ssl/ssl_certificate.pem

I added other users from another domain, BBB.com through the admin panel. I forwarded the DNS through an external party so that mail.BBB.com forwards to the IP of the server.
I’ve gotten a second SSL certificate through Comodo and placed this at /home/user-data/ssl/BBB.com/ssl_certificate.pem

Restarted nginx, went to mail.BBB.com and saw that the SSL certificate was invalid as it was the certificate of AAA.com. A look through the config of nginx at /etc/nginx/conf.d/local looked good. Coudn’t find any reason why it loads the wrong SSL certificate.

Hopefully anyone can help.

offtopic; I don’t mind spending a couple of euro’s on an SSL certificate or a VPS, the same goes for good software. Is there a way to buy you a beer for the work? Your work is so far a breeze to setup correctly.

Please update to the latest Mail-in-a-Box and check out the new ssl certificates page in the control panel. It should give an idea of what’s going on. Note that it’s not sufficient for DNS to point to the box. The box also has to know it is supposed to be serving a website at that domain.

No need to buy a beer but thanks!

Thanks. This made the import of the SSL certificate very easy!

It still shows the wrong SSL certificate on a subdomain though. But as you mentioned, I should probably add the subdomain as e-mail user in order to let nginx recognise the domain.

Another thing. BBB.com/mail works, but BBB.com/cloud doesn’t. It’s also missing in the conf.d of nginx. Is there a way to enable this? Editing the conf.d won’t get me far for long as it will be overwritten.

That’s just how the box works. You can’t make up URLs — you have to follow the instructions. :slight_smile:

True, but there isn’t a way to add the /cloud domain to another e-mail domain that’s on the box? That would be great :smile: