2 Replies Latest reply on Sep 7, 2016 12:46 PM by Matt Hempleman

    Jboss redirects to invalid URL

    Matt Hempleman Newbie

      Hi All,

       

      I'm new to Jboss configuration so this is hopefully and easy fix.  I'm in the process of getting an old web application migrated to Java 8 and Spring 4.  The migration is complete and everything works as expected in my dev environment; however, when i deploy to our production environment, the ear deploys without error but I cannot access the UI.  I know I'm using the correct URL... context root is correct... etc.  When I try to connect to the application, jboss redirects to an invalid https url.  The correct url is ipaddress:8080/web-server/ui/Application.html but jboss redirects to https://ipaddress/web-server/ui/Application.html.  Notice that it is removing the port.  I know this is a Jboss security issue, but I'm not sure where to look so any suggestions would be appreciated.  Thanks.

       

      Jboss 6.4 eap

      Java 8

      Spring 4

        • 1. Re: Jboss redirects to invalid URL
          jaikiran pai Master

          Are you sure it is the EAP server is doing that and not some load balancer front end that your production systems might have been configured to use? Would your production environment admins know?

           

          The other place to check is the web subsystem configuration of your standalone/domain xml and see what redirect-port it is configured for (in case a secure resource is accessed on non-secure port).

          • 2. Re: Jboss redirects to invalid URL
            Matt Hempleman Newbie

            Thanks.  The web subsystem configuration was not correct.  I added an https connector and now its working.

             

            <subsystem xmlns="urn:jboss:domain:web:2.2" default-virtual-server="default-host" native="false">

                        <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http" redirect-port="8443"/>

                        <connector name="https" protocol="HTTP/1.1" scheme="https" socket-binding="https" secure="true" enabled="true">

                            <ssl name="ssl" password="ChangeMe" certificate-key-file="${jboss.server.config.dir}/server.keystore" verify-client="want" ca-certificate-file="${jboss.server.config.dir}/server.truststore"/>

                        </connector>

                        <virtual-server name="default-host" enable-welcome-root="false">

                            <alias name="localhost"/>

                            <alias name="example.com"/>

                        </virtual-server>

                    </subsystem>