title: JBoss 5.1.0.GA - Redirect to port 443 not working, always get redirected to 8443
body: <p>I have an issue with setting up a redirect from 8080 to port 443.</p>
  
  <p>Here the scenario:
  I have a load balancer, listening to ports 80 and 443.
  All requests for port 80 are forwarded to port 8080 on the hosts behind the load balancer.
  All requests for port 443 are forwarded to port 8443 on the hosts behind the load balancer.</p>
  
  <p>When a request comes for port <a href="http://address.com" rel="nofollow">http://address.com</a>, it is using port 80 on the load balancer and port 8080 on the host, everything fine here.</p>
  
  <p>The redirect should now point to <a href="https://address.com:443" rel="nofollow">https://address.com:443</a>, but instead points to <a href="https://address.com:8443" rel="nofollow">https://address.com:8443</a> which the load balancer does not understand and therefore the request dies.</p>
  
  <p>I also tried changing the https port for the https connector to 443 (not really knowing where the port information is coming from) with no effect, still port 8443 is used.</p>
  
  <p>Anyone has an idea what I need to change to allow 80 -> 8080 ==> 443 -> 8443?</p>
  
  <p>Thanks in advance</p>
  
  <p>Here the server.xml HTTP connector:</p>
  
  <pre><code>&lt;Connector protocol="HTTP/1.1" 
    port="8080"
    address="${jboss.bind.address}"
    connectionTimeout="20000"
    redirectPort="443"
    compression="2048"
    compressableMimeTypes="text/html,text/xml,text/plain,text/css,text/javascript"
    URIEncoding="UTF-8"/&gt;
  </code></pre>
  
  <p>Here the corresponding HTTPS connector:</p>
  
  <pre><code>  &lt;Connector protocol="HTTP/1.1"
      SSLEnabled="true"
      port="8443"
      address="${jboss.bind.address}"
      compression="2048"
      compressableMimeTypes="text/html,text/xml,text/plain,text/css,text/javascript"
      scheme="https"
      secure="true"
      clientAuth="false"
      sslProtocol = "TLS" 
      ... keystore stuff ...
      /&gt;
  </code></pre>
  
  <p>And the confidential block from web.xml</p>
  
  <pre><code>&lt;security-constraint&gt;
      &lt;web-resource-collection&gt;
          &lt;web-resource-name&gt;Security Required&lt;/web-resource-name&gt;
          &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
      &lt;/web-resource-collection&gt;
      &lt;user-data-constraint&gt;
          &lt;transport-guarantee&gt;CONFIDENTIAL&lt;/transport-guarantee&gt;
      &lt;/user-data-constraint&gt;
  &lt;/security-constraint&gt;
  </code></pre>