1 Reply Latest reply: Aug 23, 2012 10:05 AM by Nicholas DiPiazza RSS

JBoss AS7 adds :80 when building a redirect when fronted by SSL terminating load balancer

Nicholas DiPiazza Novice

I am having a strange problem with redirects in JBoss AS7 whereas I did NOT have these same problems in JBoss 4, 5 or 6.


Here is a diagram of the servers I am using:


Here is a description of what is going on:


  1. Set up apache A - SSL terminates here, uses mod_proxy_http to send all traffic from 443 -> Apache B's port 80
  2. Set up apache B - No SSL here at all, simply listens on port 80 and sends traffic to JBoss AS7 through mod_jk on ajp port 8009
  3. Set up jboss as7 on with connector:


<connector name="ajp" protocol="AJP/1.3" socket-binding="ajp" scheme="https" redirect-port="443"/>


I have created a very, very simple web application SimpleWebapp that has two JSP pages only:


1) index.jsp 




    <% System.out.println("Preparing to redirect"); %>

    <% response.sendRedirect("test.jsp"); %>




2) test.jsp




  It worked




When I go to:


Suddenly the URL becomes


Note: The port 80, when I clearly specified redirect-port to 443. When I change the connector to scheme="ajp", then restart jboss, the redirect is even more incorrect:




The redirect-port parameter seems to be completely ignored. Does anyone know what is going on here?