Forum Discussion
rjordan
May 04, 2011Nimbostratus
Hey Colin,
Your example does work but it is a bit more complex than I thought I needed. I saw in the documentation that if multiple conditions are met, the last pool specified will be used. For some odd reason, I thought that node command would be handled differently. In any case, I just moved the new IF statement below my hostname stuff and it works. Below is what I'm using.
when HTTP_REQUEST {
if { HTTP::host contains "domain1.com" } {
pool domain1.com_pool
}
elseif {HTTP::host contains "domain2.com" } {
pool domain2.com_pool
}
elseif { [IP::remote_addr] equals 1.2.3.4 } {
node 192.168.10.10 80
}
else {
pool domain.com_pool
}
}