Issue
Below is a copy of my ssl.conf that I edited to remove any identifying information.
Currently, we have a wild card SSL cert, and multiple sub domains that we plan to host with this certificate. Apache confirms this should be possible
Right now, domain 2 is forwarding to www, but I can;t figure out why. In an effort to narrow it down, I removed the www virtualhost from the file altogether and redeployed. the redirect still happened (and as the only vhost, it loaded the domain2 file structure)
I can't figure out where this redirect is happening. is it possible that there is an issue with the certificate? (I confirmed that the common name on the certificate is *.example.com)
Listen ip-of-server:443
LoadModule ssl_module modules/mod_ssl.so
SSLPassPhraseDialog builtin
AcceptMutex flock
SSLSessionCache shmcb:/var/cache/mod_ssl/scache(512000)
SSLSessionCacheTimeout 300
SSLMutex default
SSLRandomSeed startup /dev/urandom 256
SSLRandomSeed connect builtin
NameVirtualHost ip-of-server:443
<VirtualHost ip-of-server:443>
SSLEngine on
SSLStrictSNIVHostCheck on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP
SSLCertificateFile /etc/apache/ssl/STAR.example.com.pem
SSLCertificateKeyFile /etc/pki/tls/private/example.com.key
ServerName "domain2.example.com"
DocumentRoot "/srv/www/domain2.example.com/public_html"
CustomLog "/srv/www/domain2.example.com/logs/access.log" combined
ErrorLog "/srv/www/domain2.example.com/logs/error.log"
<Directory /var/www/html>
AllowOverride none
Order Allow,Deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost ip-of-server:443>
SSLEngine on
SSLStrictSNIVHostCheck on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP
SSLCertificateFile /etc/apache/ssl/STAR.example.com.pem
SSLCertificateKeyFile /etc/pki/tls/private/example.com.key
ServerName "www.example.com"
DocumentRoot "/srv/www/www.example.com/public_html"
CustomLog "/srv/www/www.example.com/logs/access.log" combined
ErrorLog "/srv/www/www.example.com/logs/error.log"
<Directory /var/www/html>
AllowOverride none
Order Allow,Deny
Allow from all
</Directory>
</VirtualHost>
Solution
Turns out at some point we had a 301 redirect that pointed domain2 to www. Google chrome had cached that 301. disabling cache with devtools open caused page to load correctly over ssl.
Answered By - Drew Major Answer Checked By - Mildred Charles (WPSolving Admin)