I am running apache 2.4.6 and openssl 0.9.8. I have installed 2 SSL certs for 2 different sites and updated the config file. The domain1.com site was working fine and still is. The problem is that it is using the domain1.com cert for the domain2.com requests. It is like it is ignoring the second ssl virtual host. I added the namevirtualhost directive, but it said it was obsolete and will be removed in future releases. Any suggestions on what I am doing wrong?
Here is the relevant config code:
NameVirtualHost *:443
<VirtualHost *:443>
ServerName domain1.com
SSLEngine On
SSLCertificateFile "c:\apache\479aafc5.crt"
SSLCertificateChainFile "c:\apache\gd_bundle.crt"
SSLCertificateKeyFile "c:\apache\domain1.key"
</VirtualHost>
<VirtualHost *:443>
ServerName domain2.com
SSLEngine On
SSLCertificateFile "c:\apache\2b5c7bbe85.crt"
SSLCertificateChainFile "c:\apache\gd_bundle-g2-g1.crt"
SSLCertificateKeyFile "c:\apache\domain2.key"
</VirtualHost>