cancel
Showing results for 
Search instead for 
Did you mean: 

How we can publish multiple applications/URLs on same VIP & redirect traffic to Same application server , but to different ports based on host header ?

BR
Nimbostratus
Nimbostratus

Dear All,

 

It would be great, if anyone can guide us on the below matter,

 

" Initially, We have hosted an application, xyz.com on an application server (APP01) with port 9000. Based on this, we have configured the F5, with a VIP address and Pool, to forward the traffic to APP01 (Port 9000). Based on the VIP address, we have added the DNS entry and it all worked fine. Now, we have hosted another application, abc.com on the same application server (APP01), but on port 9010. We would like to use the same VIP address and based on this, we have added a DNS entry for the new application URL. We would like to forward the traffic to same application server, but to different ports based on the application URL/Host header."

 

  1. Need to use the same VIP Address
  2. If request URL is "xyz.com", then forward the traffic to APP01, port 9000
  3. If request URL is "abc.com", then forward the traffic to APP01, port 9010

 

Is it possible to achieve ? If so, what are the steps required ? Is there any recommendations based on the scenario?

 

We would really appreciate any help on this. Thanks in advance.

 

2 REPLIES 2

Henric_Petterss
Altocumulus
Altocumulus

First you create a new pool that contains the same application server but points to the new port.

Then you create a ltm-policy (Local Traffic / Policies) which basically is a rule-set that you can apply on the virtual server. In this policy you create Conditions and actions, and in your case it should be something like:

 

  1. HTTP Host is "xyz.com" --> Forward traffic to pool App01-9000
  2. HTTP Host is "abc.com" --> Forward traffic to pool App01-9010

 

You then attach the policy to the VIP in the Resources tab on the actual vip.

Hello,

 

Best option to achieve your requirement would be use of LTM policy as given in above post. You can also achieve same using iRule as given below.

 

when HTTP_REQUEST   {   switch [HTTP::host] {   "xyz.com" {pool App01-9000} "abc.com" {pool App01-9010}   }   }

Hope it helps!

Mayur