Wildcard SSL and Apache configuration
Posted
by
Nitai
on Server Fault
See other posts from Server Fault
or by Nitai
Published on 2010-09-21T13:08:30Z
Indexed on
2011/01/12
23:55 UTC
Read the original article
Hit count: 331
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.
© Server Fault or respective owner