3 Replies Latest reply on Nov 4, 2014 2:28 AM by gurushant

    Redirection of http (80) on https (443) problem

    pankajkapley

      I have configured SSL with following changes for Jboss-5.0.1 GA

       

      %JBOSS_HOME%\server\default\deploy\jbossweb.sar\server.xml

       

      <Connector protocol="HTTP/1.1"

               port="80" address="${jboss.bind.address}"

                     maxThreads="150" minSpareThreads="25" maxSpareThreads="75"

                     enableLookups="false" acceptCount="100"

                     connectionTimeout="20000" redirectPort="443"

                     URIEncoding="UTF-8" useBodyEncodingForURI="true"

                     disableUploadTimeout="true" />

       

      <!-- SSL/TLS Connector configuration using the admin devl guide keystore

            -->

            <Connector protocol="HTTP/1.1" SSLEnabled="true"

                 port="443" address="${jboss.bind.address}"

                 scheme="https" secure="true" clientAuth="false"

                 keystoreFile="C:/Program Files/Java/jdk1.6.0_12/bin/demo.keystore"

                 keystorePass="pankaj" sslProtocol = "TLS" 

                 URIEncoding="UTF-8" useBodyEncodingForURI="true" />

       

       

      %JBOSS_HOME%\bin\run.bat

      set JAVA_OPTS= %JAVA_OPTS% -Duser.timezone=GMT -Djavax.net.ssl.trustStore="C:\Program Files\Java\jdk1.6.0_12\bin\demo.keystore"

       

       

      %JBOSS_HOME%\server\default\deployers\jbossweb.deployer\web.xml

       

      <security-constraint>

      <web-resource-collection>

      <web-resource-name>Protected Context</web-resource-name>

      <url-pattern>/*</url-pattern>

      </web-resource-collection>

      <user-data-constraint> <transport-guarantee>CONFIDENTIAL</transport-guarantee>

      </user-data-constraint>

      </security-constraint>

       

      When I configured http on 80 port and https 443, my web application can be accessed with https://myhost/myWebApp. but when I access my web app with http://myhost/myWebApp it is not accessible.

       

      But When I configured http on 80 port and https 8443, my web application can be accessed with https://myhost/myWebApp. as well as http://myhost/myWebApp. All http (unsecured) requests are redirected to https 8443 port.

       

      Can you please tell why redirection from 80 to 8443 works and 80 to 443 doesnt work???

       

      Thanks

      Pankaj