Forum Discussion
bizooga
Nimbostratus
Nov 10, 2015Name Based Hosting iRule not working
Hi Folks,
My company hosts a bunch of sites on a single virtual server. Each website has its own pool and health monitor. I decided to use this irule to forward the request to the appropriate pool ...
VernonWells
Employee
Nov 10, 2015By the way, if you are using at least 11.4, you may consider using Local Traffic Policies for this:
If you are using a version before 11.4, Traffic Classes can be used:
An example of a Local Traffic Policy to direct queries for www.abc.com to pool1 and www.xyz.com to pool2:
ltm policy policy-hostname-redirect {
controls { forwarding }
requires { http }
rules {
www.abc.com {
actions {
0 {
forward
select
pool pool01
}
}
conditions {
0 {
http-host
values { www.abc.com }
}
}
ordinal 1
}
www.xyz.com {
actions {
0 {
forward
select
pool pool02
}
}
conditions {
0 {
http-host
values { www.xyz.com }
}
}
ordinal 2
}
}
strategy first-match
}
Naturally, this can be done via the Web UI, as well.
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