Did you know LQ has a Linux Hardware Compatibility List?
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 11-25-2008, 09:08 PM   #1
LQ Newbie
Registered: Nov 2008
Posts: 0

Rep: Reputation: 0
Question 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 are proxied to
requests for are proxied to

<VirtualHost *>
RewriteEngine on
RewriteRule ^(.*)$1 [P]

<VirtualHost *>
RewriteEngine on
RewriteRule ^(.*)$1 [P]
</VirtualHost> correctly proxies
However, when I go to, I get!

I've been trying to figure this out for a couple of days...

Any help would be greatly appreciated.


Old 11-28-2008, 06:16 AM   #2
Registered: Feb 2008
Location: JHB South Africa
Distribution: Centos, Kubuntu, Cross LFS, OpenSolaris
Posts: 806

Rep: Reputation: 41
Why dont u use mod_proxy instead it was designed for what u want to do
<VirtualHost *>
ProxyPass         /
ProxyPassReverse  /


apache, proxy, reverse

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Rewrite URL path in reversed proxy setup ptemmerman Linux - Software 1 11-18-2008 07:53 AM
Need to work out rewrite rules with proxy-balance mago Linux - Server 0 03-10-2008 07:56 PM
Sub Domains & Multiple Domains (Apache) lugos Linux - Server 1 09-01-2006 11:22 PM
Need help with Apache rewrite kinetik Linux - General 6 05-19-2006 07:02 AM
apache proxy server rewrite urls slackwarefan Linux - Software 0 10-19-2004 08:58 PM

All times are GMT -5. The time now is 10:58 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration