httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Muntz, James M" <jmmu...@sandia.gov>
Subject RE: [users@httpd] Apache2 ProxyPassReverse inside Location
Date Tue, 06 Jul 2004 19:10:04 GMT
Joshua,
I greatly appreciate your suggestions.  Unfortunately, the syntax you
suggested won't work in my case.  I have several internal servers that send
back a Location header that doesn't include the fully-qualified domain name.
E.g., "Location:  /directory/filename".  

There doesn't appear to be a configuration setting that will modify
"Location: /" to the corresponding proxy URL.  I'm testing an output filter
that should make the necessary changes.

Thanks,
Jim

-----Original Message-----
From: Joshua Slive [mailto:jslive@gmail.com]
Sent: Saturday, June 26, 2004 9:13 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Apache2 ProxyPassReverse inside Location


On Thu, 24 Jun 2004 13:21:55 -0600, Muntz, James M <jmmuntz@sandia.gov>
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
</Location>

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:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message