Forum Discussion

Mahmoud_Eldeeb_'s avatar
Mahmoud_Eldeeb_
Icon for Cirrostratus rankCirrostratus
Jun 17, 2015

how to pass a traffic hitting a single vs with different url (subdomains) to different servers?

if i have two different url (RA.abc.com & FB.abc.com) are serving by two different RA.abc.com --->> server-1 FB.abc.com --->> server-2

 

how do i configure a single vs that handle the traffic for both urls

 

4 Replies

  • nsk1's avatar
    nsk1
    Icon for Nimbostratus rankNimbostratus

    when HTTP_REQUEST { log local0. "http request: client <[IP::client_addr]>, host <[HTTP::host]>, uri <[HTTP::uri]>"

    switch -glob [string tolower [HTTP::uri]] { "/xx/v1/RA/xyz/*"

        pool pool_RA
    

    "/xx/v1/FB/xyz/*"

            pool pool_FB
    

    } }

  • Hi,

     

    Starting with version 11.4, you can use Local traffic policies.

     

    it is easier to configure:

     

    Menu Local traffic --> Policies

     

    Create a new policy with :

     

    • require : http
    • Action : forwarding

    Create one rule per hostname

     

    • Condition : http host host RA.abc.com
    • Action : Forward pool pool_RA