Search code examples
apachesslhttpsglassfishmod-proxy

Glassfish HTTPS redirect behind SSL offloader and Apache


I have this configuration:

  • HTTPS load balancer / SSL offloader on port 443
  • Apache httpd on port 80 (different IP), using ProxyPass, ProxyPassReverse to forward to...
  • multiple Glassfish domains listening on different ports

Problem: Neither Glassfish nor Apache is aware that the request is HTTPS. Redirects to URLs like "/index.jsp" are being rewritten in Glassfish as http://internal_ip/index.jsp, then ProxyPassReverse rewrites to http://public_ip/index.jsp. Problem is, I need that URL to be http*s*://public_ip/...

How do I fix that - is there some Glassfish configuration I can change, or Apache httpd.conf?


Solution

  • I see two solutions to that:

    1) use your loadbalancer to manipulate apaches response (iRule in F5, flex for A10 loadbalancers etc.)

    2) set up something on the loadbalancer to send another redirect to requests coming in via HTTP to use HTTPS