Your virtual host is defined wrong. Use the names not IP addresses
<VirtualHost example2.com:443>
Servername example2.com
SSLEngine on
SSLCertificateFile /etc/http/certs/example2.crt
...
</VirtualHost>From: frank picabia <fpicabia@xxxxxxxxx>
Sent: Friday, May 20, 2022 12:55 PM To: users@xxxxxxxxxxxxxxxx <users@xxxxxxxxxxxxxxxx> Subject: Re: Re: Multi-domain with SSL - Virtualhost all need IPs? I'm trying hard to get the lay of the land logic here, and it isn't happening. I'm bouncing between what I read here,
and what apache actually does, and it doesn't add up.
In my case we tried to introduce a new domain, let's call it
example2.com
It will have a different set of cert files. I let it have an IP which nothing else shares.
I'm keenly aware of this IP as I've set it up in DNS as well. <VirtualHost 1.1.1.13:443>
Servername
example2.com
SSLEngine on
SSLCertificateFile /etc/http/certs/example2.crt
...
</VirtualHost>
Every other vhost had a different servername, and they used the
cert for
example1.com . They also had *:443
Only for example1.com do we have multiple aliases on the same IP. When visiting the
example2.com site, the web site shows apache has served a certificate for
example1.com
I had believed this was because we had used *:443 rather than explicitly show the IP
for all our vhosts. It seemed the early conversation on SSL/TLS was matching a random
vhost via this use of *:443 and that's how it got the cert for
example1.com
Since before this point all vhosts were on
example1.com the wildcard cert it
found was always working while we had *:443 in use. What can we say about how multi-domain SSL works that we can rely on?
I can find a dozen pages on google search from people who get the wrong
certificate and they never get an answer. Some good hard rules on what is required would probably help a lot of people over the years. On Fri, May 20, 2022 at 11:59 AM Frank Gingras <thumbs@xxxxxxxxxx> wrote:
|