httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kresimir Peharda <kpeha...@yahoo.com>
Subject [users@httpd] ProxyPass/ProxyPassReverse switch from http to https on redirect? (Apache 2.2.0)
Date Sun, 12 Feb 2006 20:58:45 GMT
I am struggling to set up a reverse proxy, and for some reason, just can't get
it right. 

I have a public server (will call it "frontend") to access a private one
("backend"). The "backend" sends a couple of redirects, which seem to confuse
the ProxyPassReverse, so eventually my browser ends up querying the DNS for the
whereabouts of the "backend". Namely, it goes like this:

In httpd.conf:
<Location /b-end/>
    ProxyPass http://backend/
    ProxyPassReverse http://backend/
</Location>

This has for effect that a request to:
Host: frontend
GET /b-end/ HTTP 1.1 

- gets forwarded to the backend, and a reply to the browser is rewritten like:
HTTP 1.1 302
Location: http://frontend/b-end/Login/

Now, the browser tries:
Host: frontend
GET /b-end/Login/ HTTP 1.1 - so far, so good

- and the proxy replies with:
HTTP 1.1 302
Location: http://frontend/b-end/Login/ - and this is wrong, since the proxy
actually gets that the document moved to https://backend/Login/, hence the
location should be rewritten like - https://frontend/b-end/Login/. However, it
always remain http.

I tried rewriting it to /sb-end/ with a directive:

ProxyPassReverse /sb-end/ https://backend/ - but I still get

Location: http://frontend/sb-end/Login/ - where I hoped it to be
https://frontend/sb-end/Login/

Needless to say, I tried a number of other tricks, including mod_ext_filter,
mod_rewrite, however, with no result.

I would sure like to understand what am I doing wrong.

Thanks in advance,
Kresimir

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
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