Forum Moderators: phranque

Message Too Old, No Replies

multiple domains behind a wildcard SSL Certificate

route requets depending on domain

         

sunweiss

4:39 am on Oct 29, 2009 (gmt 0)

10+ Year Member



Hi!

Ive wracked by brain in order to figure out how to do something like this:

<virtualhost *:443>
ServerName abc.com
ServerAlias *.abc.com
ServerAlias *.def.com

<ssl related lines,certificate,ca etc>

#PSEUDO CODE
if %DOMAIN == "abc.com" {
ProxyRequests Off
ProxyPreserveHost On
ProxyRequests Off

<Proxy *>
Order deny,allow
Allow from all
</Proxy>

ProxyPass / [localhost:8080...]
ProxyPassReverse / [localhost:8080...]

} else {
normal serve from document root etc
}

</virtalhost>

any help much appreciated

jdMorgan

3:29 pm on Oct 29, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I don't know how you're going to get your cert to work for more than one domain, but your "If DOMAIN=abc.com" logic construct would be best (most -easily and -naturally) implemented using separate VirtualHost containers. Having done that, you're free to point them to the same server filespace (DocumentRoot) or to reverse-proxy them to the same back-end if you wish.

Jim