AndreyS_294380
Jan 23, 2017Nimbostratus
iRule pool selection based on [HTTP::host]
Hello,
I'm trying to distribute traffic that comes to VS among some pools based on ]HTTP::host]. Here is the iRule but unfortunately it doesn't work:
when HTTP_REQUEST {
set hostname [string tolower [HTTP::host]] if { $hostname contains "site1.com" } { pool pool1 } elseif { $hostname contains "site2.com" } { pool pool2 } elseif { $hostname contains "site3.com" } { pool pool3 } }
VIP resets the connection:
Recv failure: Connection reset by peer
Wireshark says that RST has been sent due to "no server selected"
Looking for your help.