[users@httpd] RE [users@httpd] ProxyPass/ProxyPassReverse switch from http to https on redirect? (Apache 2.2.0)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

bye

Oliver

-----Ursprüngliche Nachricht-----
Von: Kresimir Peharda [mailto:kpeharda@xxxxxxxxx]
Gesendet: So 12.02.2006 21:58
An: users@xxxxxxxxxxxxxxxx
Betreff: [users@httpd] ProxyPass/ProxyPassReverse switch from http to https on redirect? (Apache 2.2.0)
 
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


<<winmail.dat>>

---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux