I'm trying to figure out the configuration for the following:
Multiple Domains - (example1.com, example2.com, example3.com) Single Virtual Host Wildcard Subdomains (*.example1.com, *example2.com, etc)
My current configuration is:
<VirtualHost *:80>
ServerAlias *.|DOMAIN|
RewriteEngine on
ReWriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L]
</VirtualHost>
<VirtualHost *:443>
ServerAlias *.|DOMAIN|
SSLEngine On
DocumentRoot /SITES/WWW/public
SSLCertificateFile /SITES/SSL/example1.com.crt
SSLCertificateKeyFile /SITES/SSL/example1.com.key
SSLCertificateChainFile /SITES/SSL/gd_bundle-g2-g1.crt
</VirtualHost>
My VirtualHosts and redirects are working fine for all domains. The issue I'm having is with SSL. Each domain has its own SSL certificate and I can't seem to use the |DOMAIN|
variable in the SSL configuration.
How do I go about configuring the SSL certificate based on the domain being used?
Thank you in advance for any guidance - really appreciate it!