Forum Discussion
Brad_Parker
Dec 11, 2015Cirrus
This can absolutely be achieved. First you would setup you http VIP an attach an iRule like this. There is one built in, but its a 302 redirect.
when HTTP_REQUEST {
HTTP::respond 301 noserver Location "https://[HTTP::host][HTTP::uri]" Connection close
}
Then you would create three pools each with their respective monitors for you servA, servB, and servC applications with the members being on port 80. After that you would create you HTTPS vip and add you a client SSL profile to handle your SSL termination along with an HTTP profile. Then, you can use either an iRule or a local traffic policy to choose the pools. I would suggest an iRule so you can handle your maintenance message locally if you want.
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::path]] {
"/servA*" {
if { [active_members servA_pool] > 0 }{
pool servA_pool
}
else {
HTTP::respond 200 content "HTML for maintenance response" noserver
}
}
"/servB*" {
if { [active_members servB_pool] > 0 }{
pool servB_pool
}
else {
HTTP::respond 200 content "HTML for maintenance response" noserver
}
}
"/servC*" {
if { [active_members servB_pool] > 0 }{
pool servB_pool
}
else {
HTTP::respond 200 content "HTML for maintenance response" noserver
}
}
}
}