Reverse proxy HTTP > HTTPS; redirects

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

 



Hi folks,

This should be simple, but I can't seem to google a clear & direct answer.

My shared host runs Apache (of course).  I have an SSL listener set up as a 
reverse proxy to a server my (non-root) account can control, thusly:

ProxyPass / http://127.0.0.1:8001
ProxyPassReverse / http://127.0.0.1:8001

However, HTTP redirects issued by the back-end server seem not to be getting 
rewritten by the Apache proxy.  The Apache SSL listener/proxy is sending back 
responses to clients with Location: http:// xxxxx in the header, rather than 
https:// xxxxx.  Now this isn't a deal-breaker, because I can configure the 
plain old httpd to redirect to the SSL listener, but obviously that's 
inelegant & bad for performance.

Can anyone tell me what I'm doing wrong & how to fix it?  I'm sure it must be 
pretty basic.

FYI, here's a dump of the headers from a session, where a successful login is 
redirecting to /user/home.

TIA

=======

https://www.${DOMAIN}.com/login/

POST /login/ HTTP/1.1
Host: www.${DOMAIN}.com
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.5) 
Gecko/2009011218 Gentoo Firefox/3.0.5
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: https://www.${DOMAIN}.com/login/
Cookie: sessionid=6058edfde3962b5c45e669cf300725f0
Content-Type: application/x-www-form-urlencoded
Content-Length: 34
username=xxxx&password=xxxx
HTTP/1.x 302 Found
Date: Tue, 20 Jan 2009 12:41:02 GMT
Server: JWS 1.3
Served-By: Joyent
Expires: Tue, 20 Jan 2009 12:41:02 GMT
Vary: Cookie,Accept-Encoding
Last-Modified: Tue, 20 Jan 2009 12:41:02 GMT
Etag: "d41d8cd98f00b204e9800998ecf8427e"-gzip
Location: http://www.${DOMAIN}.com/user/home/
Cache-Control: max-age=0
Content-Type: text/html; charset=utf-8
Set-Cookie: sessionid=064d00c0a336724e76cd1dc385ede009; expires=Tue, 
03-Feb-2009 12:41:02 GMT; Max-Age=1209600; Path=/
Via: 1.1 ${DOMAIN}.com
Content-Encoding: gzip
Content-Length: 20
Connection: close
----------------------------------------------------------
http://www.${DOMAIN}.com/user/home/

GET /user/home/ HTTP/1.1
Host: www.${DOMAIN}.com
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.5) 
Gecko/2009011218 Gentoo Firefox/3.0.5
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cookie: sessionid=064d00c0a336724e76cd1dc385ede009

HTTP/1.x 404 Not Found
Date: Tue, 20 Jan 2009 12:41:02 GMT
Server: Apache
Served-By: Joyent
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 180
Connection: close
Content-Type: text/html; charset=iso-8859-1
----------------------------------------------------------

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