For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

siyadh_121603's avatar
siyadh_121603
Icon for Nimbostratus rankNimbostratus
Jan 22, 2015

Multiple Domain with same VIP & same Back-end server with different port.

domainA.com domainB.com

 

we need to have redirection to pool as below:

 

when domainA.com then request need to go to poolA:8090 when domainB.com then request need to go to poolA:7002

 

can we do this with iRules..?

 

1 Reply

  • A couple questions to clarify.

    • Do you have both domains going to a single VIP already?
    • Could you just use 2 pools (poolA and poolB) and then let the iRule select the proper pool based on hostname?

    You can check out this page to get an idea of how to start working with iRules so that you can create one to do what you'd like, and in the future you'll be able to maintain it easily.

    But basically, you'll do something similar to this:

    when HTTP_REQUEST {
        switch [string tolower [HTTP::host]] {
            "domaina" {
                pool poolA
            }
            "domainb" {
                pool poolB
            }
            default {
                 Where do you do go neither domain name is used? Maybe nothing and let it go to the default pool on the VIP
            }
        }
    }