Forum Discussion
Multiple context paths on same FQDN and real servers
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
}
}
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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