Multiple certs, one server, one ip

Tried the search and looked thru the “Your topic is similar to …” (cool feature btw.)

Running CentOS 7.
Used Certbot and manually entered the certs in my Apache .conf file.
I have 1 IP and multiple sites declared in my VirtualHost directive which are hosted on this server.

When I ran certbot, it found all the domains I’m hosting on this site, generated my keys, chain etc.

The problem is when I go to the sites and look at the cert it shows the server’s domain, not the site.

IE. is the server is site 1. is site2… etc

When viewing the cert in a browser for, it states “”. How do I change that to show “” ?

1 Like

Could you please specify the real domain names? It would save a lot of time.

If you issued separate certificates for your domains, each of them has to be assigned a VirtualHost with the corresponding domain name as ServerName or ServerAlias.

Did you create the separate VirtualHosts?

for example…

Yes, all sites are in their own VirtualHost directive and have a ServerName and ServerAlias. When I ran certbot, I was prompted the following:

“Which names would you like to activate HTTPS for?”. I selected all that was listed since those were the sites I am hosting.

Yes, all of the virtualhost directives are specified by IP:443

Could you specify the address where you get the wrong certificate? I don’t see any problem here, at least with these both domain names you offered.

for example…maybe I’m misunderstanding… view the cert, issued to “”. Shouldnt it say “” ?

Ah! I see. What you mean is the common name of a certificate. That’s one of the domain names which the certiicate is valid for, next to the names which are listed as subjectAltName.

To work around this, you have to issue separate certificates for each of your domain (including domain name without and with leading www.), then you assign each certificate to the corresponding virtual host. So you have to run certbot multiple times selecting the relevant domain names.

1 Like

Ok, that makes sense. I misunderstood certbot then. When I selected all domains, I thought it was strange to think it would be “all domains in one cert file”. LOL. What you said makes sense. I’ll redo it for each site. I appreciate your replies btw!! Thanks!

1 Like

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