Forum Discussion
muliple URL's to different pools - one VIP
I have a requirement for some URL's to point to a single VIP I need to write an Irule to accomodate a number of URL's that use the same vip but point down to Server side VIP's
so far I am thinking something like this ??
We have to client SSL offload and then re-crypt on the Serverside..
There is no default pool.. every URL matches to a pool using an FQDN node.
when HTTP_REQUEST { switch -glob -- [string tolower [HTTP::uri]] { "mysite1.mydomain.com" { pool MYPOOL-1 } "mysite2.mydomain.com" { pool MYPOOL-2 } } }
8 Replies
- Brad_Parker_139
Nacreous
It looks like you are wanting to direct to pool by host name, not URI. In that case you would do something like this. You also don't need
unless you are going to use wildcards(*). In your case, it would be more efficient to ommit the glob.globwhen HTTP_REQUEST { switch -- [string tolower [HTTP::host]] { "mysite1.mydomain.com" { pool MYPOOL-1 } "mysite2.mydomain.com" { pool MYPOOL-2 } } }- Brad_Parker_139
Nacreous
If you know that every host name matches a pool that you have created with the same FQDN you could even do something like this. when HTTP_REQUEST { pool [string tolower [HTTP::host]] } - Thanks.. it is the case that two of the hostnames direct to the same Pool .. so is is possible to forward like this: when HTTP_REQUEST { switch -- [string tolower [HTTP::host]] { "mysite1.mydomain.com" "mysite3.mydomain.com" { pool MYPOOL-1 } "mysite2.mydomain.com" { pool MYPOOL-2 } } }
- Brad_Parker_139
Nacreous
This will accomplish that for you you need a dash between the two, when HTTP_REQUEST { switch -- [string tolower [HTTP::host]] { "mysite1.mydomain.com" - "mysite3.mydomain.com" { pool MYPOOL-1 } "mysite2.mydomain.com" { pool MYPOOL-2 } } }
- Brad_Parker
Cirrus
It looks like you are wanting to direct to pool by host name, not URI. In that case you would do something like this. You also don't need
unless you are going to use wildcards(*). In your case, it would be more efficient to ommit the glob.globwhen HTTP_REQUEST { switch -- [string tolower [HTTP::host]] { "mysite1.mydomain.com" { pool MYPOOL-1 } "mysite2.mydomain.com" { pool MYPOOL-2 } } }- Brad_Parker
Cirrus
If you know that every host name matches a pool that you have created with the same FQDN you could even do something like this. when HTTP_REQUEST { pool [string tolower [HTTP::host]] } - Thanks.. it is the case that two of the hostnames direct to the same Pool .. so is is possible to forward like this: when HTTP_REQUEST { switch -- [string tolower [HTTP::host]] { "mysite1.mydomain.com" "mysite3.mydomain.com" { pool MYPOOL-1 } "mysite2.mydomain.com" { pool MYPOOL-2 } } }
- Brad_Parker
Cirrus
This will accomplish that for you you need a dash between the two, when HTTP_REQUEST { switch -- [string tolower [HTTP::host]] { "mysite1.mydomain.com" - "mysite3.mydomain.com" { pool MYPOOL-1 } "mysite2.mydomain.com" { pool MYPOOL-2 } } }
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