httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <>
Subject Re: [users@httpd] Apache2 ProxyPassReverse inside Location
Date Sun, 27 Jun 2004 03:12:36 GMT
On Thu, 24 Jun 2004 13:21:55 -0600, Muntz, James M <> wrote:
> Greetings,
> I'm running Apache v2.0.49 as a reverse proxy on an HPUX 11.0 server.  I've
> run into a problem with the ProxyPassReverse directive inside a Location
> section.  It appears the "ProxyPassReverse /" is applied globally, instead
> of being limited to the specified Location.
> If I access a page using http://reverse.hostname.domain/rproxy2/ that
> returns a header "Location: /abc", the proxy converts it to
> http://reverse.hostname.domain/rproxy1/abc (should be rproxy2).
> Here are my directives:
> ProxyPass        /rproxy1 http://internal1.hostname.domain
> ProxyPassReverse /rproxy1 http://internal1.hostname.domain
> ProxyPass        /rproxy2 http://internal2.hostname.domain
> ProxyPassReverse /rproxy2 http://internal2.hostname.domain
> <Location /rproxy1/>
>  ProxyPassReverse /
> </Location>
> <Location /rproxy2/>
>  ProxyPassReverse /
> </Location>

You have two problems here:

1. You don't need the third and fourth ProxyPassReverse directives at
all.  The First and second will do all the work for you.  The
ProxyPass(Reverse) inside a <Location> section is just a shorthand
*replacement* for a ProxyPass(Reverse) in the main server context.

2. When using ProxyPass(Reverse) inside a <Location> section, you need
to omit the *first* argument, not the second.  In other words, you
should have used
<Location /rproxy1>
ProxyPassReverse http://internal1.hostname.domain

My guess is that by fixing either of the above two issues, your
problem will go away.

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