4 Replies Latest reply on Mar 2, 2011 1:12 AM by welle

    Port Redirect

    thandog

      Hi guys,

      I think this issue has been dealt with before but the ones I see are not working for me.

      I have JBoss 5.1 running on port 8080 on my test server. Now there is another server that tries to connect using port 443. Can I open port 443 and redirect the traffic to port 8080?

      So while it is looking for http://myserver:443/myapp, it gets redirected to http://myserver:8080/myapp.

       

      I have the folowing in the server.xml:

            <Connector protocol="HTTP/1.1" port="8080" address="${jboss.bind.address}"

                     connectionTimeout="20000" redirectPort="8443" />

       

                                       <Connector protocol="HTTP/1.1" port="443" address="${jboss.bind.address}"

                     connectionTimeout="20000" redirectPort="8080" />

       

      Any help will be greatly appreciated.

        • 1. Re: Port Redirect
          welle

          Hmm ...  443 is the standard port for https! Are you sure that the client are using http and not https?

           

          There is no port redirekt in JBoss (use a local firewall instead)

           

          There is nothing that stops you from specify a NEW http connector in server.xml that binds to 443 (if you are allowed to open such a "low" server socket that is). The new connector should be possible to use in parallell with the 8080 one.

          • 2. Re: Port Redirect
            welle

            Look in the documentation what "redirectPort" means!

             

            I still think that the client tries to use https....

            • 3. Port Redirect
              thandog

              Hi Anders,

               

              you are quite right, the client is using https. That was a mistake on my side. So they are trying to connect to

              https://myserver:443/myapp. WWill adding the new connector redirect them to http://myserver:8080/myapp or will it keep https?

              • 4. Port Redirect
                welle

                If the client insists on HTTPS it will not help to start a HTTP connector on port 443. I would enable the prepared https connector and change the port to 443 instead of 8443. (You need to have a keystore to use though)

                 

                Or use port forwarding in the local firewall (if any) or operation system to redirect 443 to 8443.

                 

                The easiest solution is of course to change the client, but I guess that would be to easy ;-)