Forum Discussion
we have 3 external web urls which will come on our frontend f5 and redirect to internal web urls and use as a revers proxy
It's interesting how often this comes up, and the most important thing to understand here is the (potentially incorrect) use of the term "redirect". In HTTP-speak, and equally in BIG-IP iRules, a redirect is a flow control command. Given a typical reverse proxy configuration, where a client request flows through the proxy to the server, a redirect inserted at the proxy causes a preempt response back to client without passing traffic to the server. I'm assuming that's not what you want.
So based on your description, there are at least three requirements:
- Terminate the client side SSL and pass server side HTTP unencrypted
- Parse HTTP requests
- Modify the HTTP Host request header
The first is accomplished by incorporating a client SSL profile. The second is accomplished via attached HTTP profile. And the third can be a fairly straight forward iRule. I'm assuming here that all three external URLs are coming to the same virtual server and iRule.
when HTTP_REQUEST {
switch [string to lower [HTTP::host]] {
"site1ex.com" {
HTTP::host "site1in.com"
}
"site2ex.com" {
HTTP::host "site2in.com"
}
"site3ex.com" {
HTTP::host "site3in.com"
}
default {
HTT::host "site1in.com"
}
}
}
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