views:

106

answers:

1

We use Apache as a reverse proxy server. This has been working well, but I now need to have http://domain.com/sub1 proxy to serverA and http://domain.com/sub2 proxy to serverB. Is this possible? If so, what is the config for it?

Here is my existing config:

...
<VirtualHost 555.55.555.555:80>
ServerName domain.com
DocumentRoot c:/docroot

ProxyPass / http://serverA/
ProxyPassReverse / http://serverA/
</VirtualHost>
...
+1  A: 

You've almost got it. You want something like:

ProxyPass /sub1 http://serverA/
ProxyPassReverse /sub1 http://serverA/
ProxyPass /sub2 http://serverB/
ProxyPassReverse /sub2 http://serverB/

Check out the documentation for the ProxyPass directive, there are some neat tricks you can do with it.

Iceman
I feel dumb. It has only been 4 years since I've had to touch the config though... Thank you!
consultutah