View Single Post
  #20 (permalink)  
Old 08-05-2006, 12:58 AM
ljm ljm is offline
Project Contributor
 
Posts: 81
Default https reverse proxy

After bit more poking around ... ?redirect=0 works as expected for me under both http and https when going browser <==> zimbra. It's only browser <==> reverse proxy <==> zimbra that I'm having trouble with https.

Given that my ?redirect=0 problem only relates to https and only with a reverse proxy involved, no doubt my problem relates to the reverse proxy configuration. I'm blowed if I can figure it out. Anyway, with that said...

Yes, even using an IP address in the RewriteRule and ProxyPassReverse lines, the server sends a 302 redirect.

The SOAP request outbound to the reverse proxy:
POST https://zimbra.example.com:443/zimbra/auth/?redirect=0 HTTP/1.1
Host: zimbra.example.com
Referer: https://zimbra.example.com/zimbra/?redirect=0
Cookie: JSESSIONID=2F06A8C02BBD9F40FB5725B75B8952D5; ls_last_username=foo; ls_last_server=zimbra.example.com
Content-length: 195
X-Forwarded-For: 192.168.22.2

authToken=a-big-number

The ssl.conf doing the reverse proxy:
ProxyPassReverse / https://192.168.5.10/
RewriteRule ^/(.*)$ https://192.168.5.10/$1 [P]

The SOAP response from zimbra, coming back via the reverse proxy - note the ip address in the Location header:
HTTP/1.1 302 Moved Temporarily
Date: Sat, 05 Aug 2006 06:29:18 GMT
Server: Apache-Coyote/1.1
Expires: Sat, 12 Aug 2006 06:26:13 GMT
Cache-control: public, max-age=604800, post-check=7200, pre-check=604800
Set-Cookie: ZM_AUTH_TOKEN=a-big-number
Path=/
Location: https://192.168.5.10:443/zimbra/mail?redirect=0
Content-length: 0
Via: 1.1 zimbra.example.com
Content-Type: text/plain
Reply With Quote