Forum Discussion
Need iRule for Redirect http to different pool of https web servers with certificate terminated in web servers
Hi Guys,
I need help to Need iRule for Redirect http to different pool of https web servers with certificate terminated in web servers.
I have 4 sites hosted in 2 servers with URL's below. Certificate are terminated at Server side pool_Server1 aaa.com/www.aaa.com bbb.com/www.bbb.com pool_Server2 ccc.com/www.ccc.com ddd.com/www.ddd.com
I used this reference, when user access http i have iRule to redirect them to https. But i dont have idea how to redirect to pool of servers if current are https. I save this link below as reference. https://devcentral.f5.com/questions/irule-for-virtual-server-to-redirect-to-different-pool
when CLIENT_ACCEPTED { Save the name of the VS default pool set default_pool [LB::server pool] } when HTTP_REQUEST {
switch -glob "[string tolower [HTTP::host][HTTP::path]]" {
"*seattle.gov/util*" {
pool spu-util-pool
}
default {
pool $default_pool
}
}
}
Please advice. Thanks
2 Replies
Hi Artorukt,
if you need to perform content switching decisionbased on the provided HTTP request headers, then you have to utilize Layer7 inspection (aka. attaching a HTTP-Profile to your virtual server). For HTTPS-sites this would have the fundamental requirement to also terminiate the SSL conection, before you're able to inspect the contained HTTP request information.
Once you have terminated the SSL-session on your F5, you could integrate your iRule to parse the requested
and[HTTP::host]
information and then select a destination pool based on the requested information. When forwarding the request to your webservers, you may want to reencrypt the traffic again to provide end-to-end alike security (aka. HTTPS-to-HTTPS bridging scenario).[HTTP::path]Cheers, Kai
- jandg_209076
Nimbostratus
Hi Kai,
Thanks, can share me a link that have config template. Or sample iRule config or guide.
I appreciate your help. Tnx
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
