Forum Discussion
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
- Kevin_Davies_40
Nacreous
What is the configuration of the virtual server - User_01_133038
Nimbostratus
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
Nimbostratus
when HTTP_REQUEST { HTTP::header replace Host "BackendNodeIP:9080" }
- Kevin_Stewart
Employee
A few questions:
-
Do both of the servers contain the same content? Does /Test/ live on both servers?
-
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.
-
- Kevin_Stewart
Employee
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.
- Thomas_Bipin_16
Nimbostratus
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]" } }
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com