Forum Discussion
nathe
Nov 18, 2015Cirrocumulus
Patrik, 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" }
}
}