You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Axel-Stéphane SMORGRAV <Ax...@europe.adp.com> on 2005/06/08 18:45:52 UTC
[users@httpd] ProxyPassReverse in context
Given the following reverse proxy configuration;
<Location /first/>
ProxyPass http://appserver/
ProxyPassReverse http://appserver/
</Location>
<Location /last/>
ProxyPass http://appserver/
ProxyPassReverse http://appserver/
</Location>
whenever http://appserver/ (the backend server) returns a redirection (302), I want the Location header to be rewritten and prefixed with either /first/ or /last/ depending on the URL that the reverse proxy was invoked with.
If I request http://reverse-proxy/last/path, and the backend server responds with a redirect to http://appserver/newpath, the client should receive a redirect to http://reverse-proxy/last/newpath. I thought this was the way it was supposed to work.
However, instead the ProxyPassReverse in the first Location section applies, and I end up being redirected to http://reverse-proxy/first/newpath.
Is this a bug, a feature, or is it just plain impossible to implement ProxyPassReverse the way I expected it to work??
-ascs
---------------------------------------------------------------------
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
Re: [users@httpd] ProxyPassReverse in context
Posted by Nick Kew <ni...@webthing.com>.
Axel-Stéphane SMORGRAV wrote:
> Given the following reverse proxy configuration;
>
> <Location /first/>
> ProxyPass http://appserver/
> ProxyPassReverse http://appserver/
> </Location>
>
> <Location /last/>
> ProxyPass http://appserver/
> ProxyPassReverse http://appserver/
> </Location>
>
> whenever http://appserver/ (the backend server) returns a redirection (302), I want the Location header to be rewritten and prefixed with either /first/ or /last/ depending on the URL that the reverse proxy was invoked with.
>
> If I request http://reverse-proxy/last/path, and the backend server responds with a redirect to http://appserver/newpath, the client should receive a redirect to http://reverse-proxy/last/newpath. I thought this was the way it was supposed to work.
>
> However, instead the ProxyPassReverse in the first Location section applies, and I end up being redirected to http://reverse-proxy/first/newpath.
>
> Is this a bug, a feature, or is it just plain impossible to implement ProxyPassReverse the way I expected it to work??
It looks like
http://marc.theaimsgroup.com/?l=apache-httpd-dev&m=110726027118798&w=2
Now I'm trying desparately to remember whether I got around to
committing the fix for that one.
--
Nick Kew
---------------------------------------------------------------------
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
Re: [users@httpd] ProxyPassReverse in context
Posted by Joshua Slive <js...@gmail.com>.
On 6/8/05, Axel-Stéphane SMORGRAV
<Ax...@europe.adp.com> wrote:
> whenever http://appserver/ (the backend server) returns a redirection (302), I want the Location header to be rewritten and prefixed with either /first/ or /last/ depending on the URL that the reverse proxy was invoked with.
>
> If I request http://reverse-proxy/last/path, and the backend server responds with a redirect to http://appserver/newpath, the client should receive a redirect to http://reverse-proxy/last/newpath. I thought this was the way it was supposed to work.
>
> However, instead the ProxyPassReverse in the first Location section applies, and I end up being redirected to http://reverse-proxy/first/newpath.
>
> Is this a bug, a feature, or is it just plain impossible to implement ProxyPassReverse the way I expected it to work??
I haven't tried it, but I don't believe this is possible. I believe
that ProxyPassReverse simply looks at the Location: header coming
back, and if it matches the ProxyPassReverse argument, it rewrites it.
It does not compare to the path on the original request.
Joshua.
---------------------------------------------------------------------
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