How do I get Apache Rewrite to proxy two domains ?
I am trying to set up an Apache conf file that will allow me to reverse proxy two (or more) different domains. Here's what I have:
In my example below, I am trying to proxy inbound requests as follows: requests for www.abc.com are proxied to www.abcdest.com requests for www.def.com are proxied to www.defdest.com <VirtualHost *> ServerName www.abc.com RewriteEngine on RewriteRule ^(.*) http://www.abcdest.com$1 [P] </VirtualHost> <VirtualHost *> ServerName www.def.com RewriteEngine on RewriteRule ^(.*) http://www.defdest.com$1 [P] </VirtualHost> www.abc.com correctly proxies www.abcdest.com. However, when I go to www.def.com, I get www.abcdest.com! I've been trying to figure this out for a couple of days... Any help would be greatly appreciated. Thanks, Russell |
Why dont u use mod_proxy instead it was designed for what u want to do
Code:
<VirtualHost *> |
All times are GMT -5. The time now is 04:17 PM. |