Forum Discussion
Host based irule & URI to point to backend pool
- Apr 29, 2022
Hi Preet_pk
If site/url is not working after mapping pool directly to the vServer then the issue is something else.
Can you verify below configurations ?
1. SNAT settings on the vServer. If backend server's default gateway is not F5 then make sure to enable SNAT settings. You can set it to AUTOMAP.
2. Is your pool showing up on the F5? Check if you have correct routing on the F5 to reach backend server.
Once this is sorted. then you can test the iRule.
Hi Preet_pk ,
I agree with PSFletchTheTek , LTM policy will be more easier & also those are more faster when it comes to execution. Still if you want to user iRule, you can refer below irule for your use case.
when HTTP_REQUEST {
if {[HTTP::host] equals "abc.local.ae"} {
if {[HTTP::uri] contains "malla"} {
pool abc-pool:8080
} elseif {[HTTP::uri] contains "mise"} {
pool abc-pool:8081
}
}
}
Hope it helps!
Hi,
Thanks for sharing the irule, tested the irule but it is not work. Below is the configuration details. Tried creating seperate VS & applied pool abc-pool:8080 directly for tesing instead of irule - still it is not working. Please let me know if F5 will not process traffic if, we are using port 443 on VS & backend server on port 8080 - as i am not able to see any traffic statistics on pool members while testing the connectivity & in browser getting "PR_CONNECT_RESET_ERROR" . Even in Packet capture can see F5 VS ip resetting the traffic to client ip address - instead of processing backend server connectivity.
VS:
10.120.10.10 Port 443
Backend irule:
when HTTP_REQUEST {
if {[HTTP::host] equals "abc.local.ae"} {
if {[HTTP::uri] contains "malla"} {
pool abc-pool:8080
} elseif {[HTTP::uri] contains "mise"} {
pool abc-pool:8081
}
}
}
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