Forum Discussion
Paulius
Dec 07, 2022MVP
I believe the following could be your solution but you need to make sure you have a pool configured named POOL-sap10-8445 with the appropriate pool members in it listening on port 8445 this way you don't have to feed a port location in the HOST field of the HTTP request.
when CLIENT_ACCEPTED {
set DEFAULT_POOL [LB::server pool]
}
when HTTP_REQUEST {
set HOST [string tolower [HTTP::host]]
set URI [string tolower [HTTP::uri]]
if { (($HOST eq "forex.mycomp.com") and ($URI eq "/forex")) } {
set SERVER_HOST [string map -nocase { "forex.mycomp.com" "sap10.company.comany.de"} [HTTP::host]]
HTTP::host $SERVER_HOST
pool POOL_sap10_8445
} else {
$DEFAULT_POOL
}
}
This configuration also assumes that you have a default pool configured on your virtual server so that any request not matching what you are concerned with goes to that pool.