Problems with mismatch of domain names

I have a apache config with one site that has multiple domain names. My problem is that when the domain name looks too much the same it makes a name mismatch and the certificate don't work.

So, if I first get a certificate for:
epiichaircare.dk

Then makes another for:
epiichairshop.dk

Only that last run will work. I also tried to "Renew & replace" the first one. Now, only that one works and the other fails. It works fine when the domain name is something completely different.

You can see the failed domain at:

Any ideas?


I ran this command:
sudo certbot --apache

My web server is (include version):
Apache/2.4.41 (Ubuntu)

The operating system my web server runs on is (include version):
Ubuntu 20.04.1

I can login to a root shell on my machine (yes or no, or I don't know):
Yes

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot):
certbot 0.40.0

1 Like

I was wrong. It doesn't work with different domains either. I must be using the wrong command to do this. How to I get a certificate for all three domains or can I change something in the config?

1 Like

All you had to do is create multiple vhost entries in the .conf file. Works now :slight_smile:

2 Likes

Hi @madeby

yes, that's the basic requirement if you want to use --apache.

One port 80 vHost -> one certificate -> one template to create the port 443 vHost.

Happy to read you have found a solution :+1:

2 Likes
2 Likes

And please show us the output of the command.

2 Likes