Jump to content
Welcome to our new Citrix community!

on reverse proxy on netscaler


Recommended Posts

I have 100 Applications running with different URLs today. what i want all them to migrate to Netscaler LB solution with one single URL..

My plan is to have 1 Single LB VIP with some FQDN on DNS for it.. and having some redirection rules on it to specific web server,

Like if someone hits to my LB VIP it will have to indentify basis the /abc redirect to 1 web server.. and if someone type /xyz  redirect it to second web sever..

how to achive this please guide

Link to comment
Share on other sites

you need a one vip  and use content-switching.

you need to create multiple content-switching policies and bind them to your cs vip:

 

add cs policy pol_test_abc -rule "HTTP.REQ.URL.PATH.STARTSWITH (\"/abc\")"

add cs policy pol_test_cde -rule "HTTP.REQ.URL.PATH.STARTSWITH (\"/cde\")"

.....

 

bind cs vserver cs-test -policyName pol_test_abc -targetLBVserver lb-abc -priority 10

bind cs vserver cs-test -policyName pol_test_cde -targetLBVserver lb-cde -priority 20

....

 

 

Link to comment
Share on other sites

You can use Content Switching to sort traffic to different lb vservers behind the cs vserver. Instead of redirects.

https://docs.citrix.com/en-us/netscaler/12/content-switching.html

 

Users use http://webstuff.demo.com//

The FQDN resolves to the CS vserver VIP.

The CS policies then sort traffic to the lb vserver behind the CS vserver. The transaction is invisible to the users. And you only need one public VIP.

 

 

Basic Example:

add cs vserver cs_vsrv_webstuff HTTP <VIP> 80

add lb vserver lb_vsrv_app1 http 0.0.0.0 0 # this is a non-addressable vserver

add lb vserver lb_vsrv_app2 http 0.0.0.0 0

# bind appropriate services to each lb vserver along with lb method, persistence, etc...

 

add cs action cs_act_app1 -targetLBvserver lb_vsrv_app1

add cs policy cs_pol_app1 -rule "http.req.url.path.get(1).set_text_mode(ignorecase).eq("abc1")  -action cs_act_app1

add cs action cs_act_app2 -targetLBvserver lb_vsrv_app2

add cs policy cs_pol_app2 -rule "http.req.url.path.get(1).set_text_mode(ignorecase).eq("xyz1")  -action cs_act_app2

 

bind cs vserver cs_vsrv_webstuff -policyName cs_pol_app1 -priority 100

bind cs vserver cs_vsrv_webstuff -policyName cs_pol_app2 -priority 100

 

Note: There are lots of ways to base the cs policy expressions.

You can also use stringmaps or patternsets for more complicated rules.

CS also supports expression based, so if the vservers were named with the path elements, you can use one policy/action to sort to lb vservers by constructing the vserver name.

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...