httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject [users@httpd] RE [users@httpd] ProxyPass/ProxyPassReverse switch from http to https on redirect? (Apache 2.2.0)
Date Mon, 13 Feb 2006 08:32:29 GMT
Where in your config should come the https from ?

If you want a secure communication to the backend than make a virtual host on Port 80 for
the frontend, rewrite than all incoming requests from the second virtual host which is listening
on Port 443 of your frontend server and put there (in the 443 Virtuel Host Config )your ProxyPass



-----Urspr√ľngliche Nachricht-----
Von: Kresimir Peharda []
Gesendet: So 12.02.2006 21:58
Betreff: [users@httpd] ProxyPass/ProxyPassReverse switch from http to https on redirect? (Apache
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/

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

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,

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

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