Wildcard SSL and Apache configuration
- by Nitai
Hi all,
I'm pulling my hard on this configuration, which probably is simply. I have a wildcard ssl certificate which is working. I have the website setup to run on domain.com under SSL.
Now, I'm in need to run many subdomains (*.domain.com) on the same server with the same SSL certificate. Shouldn't be that hard, right? Well, I can't get it going.
Point is, that the first config is another Tomcat server that serves another site and listens to domain.com and www.domain.com. The other config listens to *.domain.com and pulls the content from another Tomcat server.
I already tried this whole setup with mod_rewrite, but simply don't see what I'm doing wrong. Any help very much appreciated.
Here is my conf in Apache 2.2:
<VirtualHost *:443>
SSLEngine on
SSLCertificateFile ...
SSLCertificateKeyFile ...
SSLCertificateChainFile ...
ServerName domain.com
ServerAlias www.domain.com
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPreserveHost On
ProxyPass / ajp://localhost:8010/
ProxyPassReverse / ajp://localhost:8010/
</VirtualHost>
<VirtualHost *:443>
SSLEngine on
SSLCertificateFile ...
SSLCertificateKeyFile ...
SSLCertificateChainFile ...
ServerName domain.com
ServerAlias *.domain.com
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPreserveHost On
ProxyPass / ajp://localhost:8009/
ProxyPassReverse / ajp://localhost:8009/
</VirtualHost>
Thanks.