0 Replies Latest reply on Jan 6, 2016 6:05 PM by robertws

    Wildfly 9.0.2 redirect problem when running behind a load balancer

    robertws

      I am running two servers running Wildfly 9.0.2 behind a load balancer.  Our web application has a component written using Apache Wicket.  Wicket uses HTTP Redirects to navigate between pages.  Our problem is that requests come through the load balancer using an address "loadbalanced", get passed to a server, and the redirect comes out as http://serveripaddress/location/.  Details below

       

      Load balancer name "loadbalanced"  IP 192.168.0.2

      Server 1 name "server1" IP 192.168.0.3"

      Server 2 name "server2" IP 192.168.0.4"

       

      Incoming request  http://loadbalanced:8080/content/   HTTP Post

      Gets routed to server 1

      Server1 builds a response that is an HTTP Redirect (302)

      Redirect to:  HTTP://192.168.0.3:8080/page2

       

      We need the Redirect to be to HTTP://loadbalanced:8080/page2

       

      We have been able to reduce the amount of redirects from Wicket in our application, however there are still some.

      Is there some configuration I can make in Standalone.xml that would have the redirect be to the path from the http request?  Or an entry that I specify.

       

      I'm new to this - I appreciate any help you can provide.

       

      Thanks