For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

User_01_133038's avatar
User_01_133038
Icon for Nimbostratus rankNimbostratus
Jul 24, 2014

Unable to view Webpage through Load Balancer

Hi,

 

We have a two back end nodes running IBM HTTP Webserver and listenign on port 9080. We are doing SSL offloading on LB.

 

When we are directly hitting the page of the back end node we are able to view the console page but if i am trying to hit LB we are receving the below error

 

Not Found

 

The requested URL /Test/ was not found on this server.

 

IBM_HTTP_Server at Port 9080

 

Could anyone help me fix this issue. Is there any IRule we can write to resolve this.

 

6 Replies

  • Hi,

     

    Just ssl offloading profile and basic http profile. Snat Auto Map. everythign else is default. Contains two back end nodes running port 9080 when i add the below irule it works fine. but im not sure if i ca n do this sincei need to send request to both the back end nodes.

     

    when HTTP_REQUEST { HTTP::header replace Host ":9080" }

     

    • User_01_133038's avatar
      User_01_133038
      Icon for Nimbostratus rankNimbostratus
      when HTTP_REQUEST { HTTP::header replace Host "BackendNodeIP:9080" }
  • A few questions:

     

    1. Do both of the servers contain the same content? Does /Test/ live on both servers?

       

    2. Do the servers need to have their respective IP:port in the Host header to work? That's a somewhat rare requirement these days. With the above iRule in place, does it work to go to /Test/, and if so does it behave the same going to both servers? Disable each pool member in turn to test them individually.

       

  • But how do i write an irule for load balancing between both web servers

    Here's a very basic iRule that changes the Host header based on the load balancing decision:

    when HTTP_REQUEST_RELEASE {
        HTTP::header replace Host "[LB::server addr]:9080"
    }
    

    This should work on a v11 system. If you're on v10.x, then you'd need to do something like this:

    when HTTP_REQUEST_SEND {
        clientside {
            HTTP::header replace Host "[LB::server addr]:9080"
        }
    }
    

    Both of these events are triggered after the load balancing decision, so you can take this information to replace the Host header before leaving the box.

    or is there any change that needs to be done on the Webserver so that it accepts the header that the LB sends.

    That would depend entirely on the application itself.

  • I feel this is where X-Forwarding will help. Just my opinion. Noticed "0" contributions :=)

    when HTTP_REQUEST {
    if { [HTTP::header exists "X-Forwarded-For"] } {
        log local0. "X-Forward IP:  [HTTP::header values "X-Forwarded-For"]"
        log local0. "Client IP:  [IP::client_addr]"
    }
    }