httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Evans <>
Subject Re: [users@httpd] Reverse proxy with mod_rewrite using RewriteRule [P]
Date Tue, 02 Mar 2010 16:53:28 GMT
2010/3/2 Daniel López Robles <>:
> Hello:
> We have two Apaches in a server:
> Apache 2.2.14, reverse proxy, listening to IP 192.168.24.X
> Apache 2.2.11, which actually serves the websites, listening to IP
> 192.168.24.Y
> Domain name points to our reverse proxy Apache, and we need
> it to send requests to the other Apache in this way:
> ->
> Our rewrite rule:
> RewriteRule ^/(.*) http://$ [L,P]

This looks very wrong.

> In RewriteLog we can see that the rewrite rule is working fine up to some
> point:
> ....
> [][rid#eef078/initial] (2) rewrite '/something' ->
> ''
> ...
> [][rid#ef3088/initial] (2) rewrite
> '/public/index.aspx' -> 'http://public/'

as these two lines point out.

If you request the URL on the
proxy, your rule says to rewrite this to http://foo/
- does that LOOK right?!

I would do this much more explicitly, rather than allow the users to
specify the hosts that we will proxy to:

ProxyPass /something/
ProxyPassReverse /something/

and then repeat those lines for each host that you wish to be proxied.

If you really can't do this, and must have it dynamic, then I suggest
a regular expression tutorial :)



The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message