1 Reply Latest reply on Dec 2, 2016 1:57 PM by ctomc

    Widfly HTTP request to HTTPS

    suvaraj

      Hi ,

      We are migrating from JBoss 7 to wildfly 9 and we using Nginx. We Jboss 7 we had the configuration as

       

       

      <connector name="http" protocol="HTTP/1.1" scheme="https" socket-binding="http" proxy-port="443"/>

       

       

      which redirected all HTTP request to HTTPS . But while migrating to wildfly 9 we tried configurating like

       

       

      <subsystem xmlns="urn:jboss:domain:undertow:2.0">

                  <buffer-cache name="default"/>

                  <server name="default-server">

                     <http-listener name="http" socket-binding="http" redirect-socket="https" proxy-address-forwarding="true"/>

                     <host name="default-host" alias="servername.com">

                          <filter-ref name="server-header"/>

                          <filter-ref name="x-powered-by-header"/>

                      </host>

                  </server>

      </subsystem>

            

       

       

      But the request is not getting redirected ,instead when the redirct happens we see the URL in the browser as http://servername.com:8080/xyz/abc.do . How do we remove the 8080 and make it to redirect to https.

       

       

      Please help us out .We have spend more than 2 weeks of time in debugging this issue.

       

      Thanks a lot for helping me out.

      Uvaraj

        • 1. Re: Widfly HTTP request to HTTPS
          ctomc

          no it didn't redirect all requests to https.

          but it treated all requests that came to http listener as they ware https ones.

           

          Direct mapping to what you had in AS7 (scheme="https" ) is not present in wildfly 9, but was added in wildfly 10 via secure="true" option.

           

          But if you post your nginx proxy config we can help you configure nginx / wildlfy to work in same way.