We have an Ubuntu 10.04 server running Apache 2.2.14 with 4 ip-based virtual hosts. We have 2 ip addresses and a ssl cert for each ip address. ex:
<VirtualHost 18.104.22.168:80> <VirtualHost 22.214.171.124:443> -> SSL 1 <VirtualHost 126.96.36.199:80> <VirtualHost 188.8.131.52:4443> -> SSL 2
No matter what we do, for some reason, Apache will always find the first virtual host included but not the second when serving https requests. This results in apache serving the ssl cert from the first vhost included for BOTH ipaddress. A very undesirable result.
All of the ip address configurations are correct. Running
apache2ctl -S says that all configurations are correct.
We do not use any name-based virtual hosts.
It does not matter which :443 vhost is included first, apache will only serve the cert from the first vhost included.
It is our understanding that apache will default to using the first vhost that it finds as the default if it does not find a virtual host for the ip address:port.
Why would this be happening?