views:

29

answers:

0

I'm trying to select a proxy based on a subdomain for a rails installation on apache2 with thin.

site1.domain.de -> <Proxy balancer://site1>...
site2.domain.de -> <Proxy balancer://site2>...

etc..

for a single domain I'm doing the following:

<Proxy balancer://site1>
  BalancerMember http://127.0.0.1:8000
  BalancerMember http://127.0.0.1:8001
  BalancerMember http://127.0.0.1:8002
</Proxy>

  RewriteEngine On
  RewriteRule ^/$ /index.html [QSA]
  RewriteRule ^([^.]+)$ $1.html [QSA]
  RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
  RewriteRule ^/(.*)$ balancer://site1%{REQUEST_URI} [P,QSA,L]

How can I blow this up to a multi subdomain setup?

Thanks Alex