10 Replies Latest reply on Nov 18, 2014 1:12 PM by Jonathan Leech

    How to enable Https and redirection from http to https with Mid-tier 7.5

      Share This:

      Hi,

       

      I would like to enable HTTPS on Mid-Tier 7.5 and Tomcat 5.5.28 and I would like to redirect user who use http to https connection.

       

      I modified the server.xml on my mid-tier with 2 connector :

       

      HTTP connector :

       

      <!-- Define a non-SSL HTTP/1.1 Connector on port 80 -->
                    <Connector URIEncoding="UTF-8"
                                       acceptCount="100"
                                       connectionTimeout="20000"
                                       enableLookups="false" disableUploadTimeout="true"
                                       maxThreads="250" minSpareThreads="25" maxSpareThreads="75"
                                       port="80" redirectPort="443" maxHttpHeaderSize="8192"
                />
      

       

      HTTPS connector :

       

      <!-- Define a SSL HTTP/1.1 Connector on port 443 -->
                    <Connector URIEncoding="UTF-8"
                                       acceptCount="100" scheme="https" secure="true"
                                       connectionTimeout="20000"
                                       enableLookups="false" disableUploadTimeout="true"
                                       maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
                                       port="443" maxHttpHeaderSize="8192"
                                       clientAuth="false" sslProtocol="TLS"
                                       keystoreFile="c:\Certificate\keystore_dev-mt.key"
                                       keystorePass="xxxxxxxx"
                                       keyAlias="dev-mt"/>
                />
      

       

      This configuration works great with the URL https://MyMidTier but when users use http://MyMidTier, I would like an automatic redirection to https://MyMidTier..

       

      How could I do that?

       

      Thank for your help.

       

      Ben