Forum Discussion
Patrik_146826
Nimbostratus
Nov 17, 2015Redirect incoming URL to correct port depending on node monitor port
Hi,
I'm fairly new with F5 and have a question about iRule or some other way to handle this.
The "problem" is as follows:
My development team have two servers running the same front end web-applicati...
nathe
Cirrocumulus
Nov 18, 2015Patrik, perhaps an irule is required then to force the host header to include the port. From the DC wiki on LB::select try this, where ServerA ip address is x.x.x.x and ServerB ip is x.x.x.y
when HTTP_REQUEST {
log local0. "lbserveraddr: [LB::server addr]"
check if serverside connection had previously been established
if { [LB::server addr] eq "" }{
if no serverside connection had previously been established, force one
so the iRule has the info required to insert a destination-specific header
eval [LB::select]
}
switch [LB::server addr] {
"x.x.x.x" { HTTP::header replace Host "[HTTP::host]:8081" }
"x.x.x.y" { HTTP::header replace Host "[HTTP::host]:8082" }
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects