Hi Nick,

Thanks for the help!

Sorry for the abbreviated configuration.  Here is my mod_proxy configuration in 
its entirety (only the hostnames in the URLs are changed).  Note that I also 
moved the ProxyPass outside of the <Location> section, at your suggestion 
(before that, I had each ProxyPass inside the <Location> for its respective 
path, omitting the path argument on ProxyPass accordingly).  Unfortunately that 
rearrangement didn't fix the situation.

ProxyRequests Off
ProxyPass /abc http://gdccideas.chn.hp.com/cgi-bin
ProxyPass /def http://gdccideas.chn.hp.com/cgi-bin
<Location /abc>
    ProxyPassReverse http://<target-hostname>/cgi-bin
</Location>
<Location /def>
    ProxyPassReverse http://<target-hostname>/cgi-bin
</Location>

Note also that on the <target-hostname> there is a CGI script, test.pl, which 
just redirects to http://<target-hostname>/cgi-bin/end.pl.

Now, the persistent problem is that when I make the following request to the 
proxy in my browser:

https://<proxy-hostname>/def/test.pl

(yes, the proxy is SSL-enabled but the target is not) I get the following 
redirect from the proxy:

Location: https://<proxy-hostname>/abc/end.pl

Notice how a request into the /def location ended-up getting redirected into 
the /abc location.  That's the problem.  Conversely, requests into /abc/test.pl 
get redirected to /abc/end.pl as they should.

Interestingly, if I reverse the 2 <Location> sections, it is the opposite 
behavior -- requests into either location for test.pl then redirect to 
/def/end.pl.  In other words, it seems to be the first ProxyPassReverse listed 
in the configuration which takes effect, regardless of the fact that each 
should be scoped just to a <Location>.

It seems the same problem as you discussed back in February 2005 (see 
http://tech.groups.yahoo.com/group/new-httpd/message/52311 and follow the link 
to Neil Hillard's problem report contained therein).

I am using Apache 2.0.59.

Please advise, and thanks very much in advance!

Scott

--- On Tue, 6/17/08, Nick Kew <[EMAIL PROTECTED]> wrote:

> From: Nick Kew <[EMAIL PROTECTED]>
> Subject: Re: [EMAIL PROTECTED] ProxyPassReverse problem inside <Location> -- 
> is there a fix?
> To: users@httpd.apache.org
> Date: Tuesday, June 17, 2008, 3:00 PM
> On Tue, 17 Jun 2008 13:43:53 -0700 (PDT)
> Scott Jorgenson <[EMAIL PROTECTED]> wrote:
> 
> > To recap, it seems the fix for ProxyPassReverse inside
> <Location> is
> > not working (at least, in Apache 2.0.59).  Details are
> below.  Does
> > anyone have any information otherwise, or shall I
> submit a bug
> > report?  (And if you've gotten it to work, I'd
> appreciate your
> > pointing-out what is wrong with my configuration. 
> Thanks in advance!)
> 
> Whoa!
> 
> Looking at your config, you have ProxyPass inside
> <Location> too.
> I think *that* won't work, for exactly the same reason
> as reported
> originally for ProxyPassReverse.  IIRC It wasn't an
> issue, because
> ProxyPass wasn't even valid in <Location>.  If it
> is now, that's
> worth a bugzilla entry.
> 
> But your config appears too paraphrased to diagnose.
> 
> 
> -- 
> Nick Kew
> 
> Application Development with Apache - the Apache Modules
> Book
> http://www.apachetutor.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: [EMAIL PROTECTED]
>    "   from the digest:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]

---------------------------------------------------------------------
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: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to