Forum Discussion
Simple Reverse Proxy
Hello - I have 3 different URLs pointing to the same Virtual Server on LTM VE 11.2.1 so a dig for each looks like:
example1.com - 10.0.0.1
exmple2.org - 10.0.0.1
example3.net- 10.0.0.1
I want:
example1.com to be proxied to pool.192.168.0.1
exmple2.org to be proxied to pool.172.16.10.1
example3.net to be proxied to pool.10.200.200.1
I have 3 URLs to the same Virtual Server now but will soon be adding 50 more and each URL will be proxied to its own pool so I am looking for the simplist way to add new URLs over the next few weeks. Thoughts?
- What_Lies_Bene1CirrostratusYou can can use a Data Group for this with the value for each domain being the Pool name required, it'll be very easy to update too.
when HTTP_REQUEST { if { [set newpool [class match -value [HTTP::host] equals host-data-group ]] ne ""} { pool $newpool } }
- Rob_78395NimbostratusThanks for the feedback! Im having trouble making this work. What would my Data Group look like?
- What_Lies_Bene1CirrostratusIn tmsh it would look something like this (which probably makes it look more complicated that it is;
ltm data-group internal host-data-group { records { example1.com { pool-1 } exmple2.org { pool-2 } } type string }
- hooleylistCirrostratusNice work Steve. You might want to either add a pool selection in an else clause or use a OneConnect on the virtual server to ensure reach request is sent to the correct pool:
- What_Lies_Bene1CirrostratusThanks, good point, I rather overlooked that! =]
- Rob_78395NimbostratusYou guys are awesome! I have OneConnect and so far the lab setup is now working smoothly. I'm excited to see how it reacts to 20-30 new URLs next week.
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