I have 2x SSLs on one server for two different domains. I've done so by making SSL number 2 point to another port number, in this case 444. Code for apache below:
<VirtualHost XX.XX.XX.XX:443>
ServerAlias *.xxxx.com
ServerName xxxx.com
SSLEngine on
SSLCertificateFile /usr/local/ssh/xxx/xxx.crt
SSLCertificateKeyFile /usr/local/ssh/xxxx/xxxx.key
DocumentRoot /var/www/www.xxxxx.com/web/
</VirtualHost>
Listen 444
NameVirtualHost *:444
<VirtualHost xx.xx.xx.xx:444>
ServerAlias *.yyyyyy.com
ServerName yyyyyy.com
SSLEngine on
SSLCertificateFile /usr/bin/yyyyy.com.crt
SSLCertificateKeyFile /usr/bin/yyyy.key
SSLCertificateChainFile /usr/bin/yyyyy.crt
DocumentRoot /var/www/www.yyyyyy.com/web/
</VirtualHost>
Currently, all of my links point to https://yyyyy.com:444/ so the user doesn't see any invalid SSL certificates. The issue is I have some users who just type in https://yyyyy.com/ and do not enter in a port # and they shouldn't have to.
If I visit, https://yyyyy.com/ it's looking at the certificate for xxxx.com and an invalid ssl cert error pops up. I've tried several mod rewrite that if the yyyyy.com is on port 443 to redirect to https://yyyyy.com:444/
I am sure the answer is obvious... But for the life of me, I can't figure it out!