Forum Discussion

Wasim_Hassan_13's avatar
Wasim_Hassan_13
Icon for Nimbostratus rankNimbostratus
Nov 19, 2014

Multiple Websites on Single VIP

Hi,

 

I have multiple websites which are currently on Microsoft TMG. I want to migrate them to F5. There are multiple URLS hosted on different servers which are running on different ports as well.

 

I have only one Public IP. I have created pools for different servers and i have applied the certficate on the VIP as well.

 

All the traffic should be SSL from the client side.

 

My requirement is

 

if any user type

 

https://site1.test.com/ http://site1.test.com/ www.site1.test.com

 

it should go

 

https://site1.test.com/arsys

 

======================

 

https://site2.test.com/ http://site2.test.com/ www.site2.test.com

 

it should go

 

https://site2.test.com/

 

=================================

 

https://site3.test.com/ http://site3.test.com/ www.site3.test.com

 

it should go

 

https://site2.test.com/

 

I have created multiple pools and will recall them in the irule.

 

How can i achieve this. Single VIP with multiple Website which require SSL offload as well as redirection of URL.

 

25 Replies

  • can you add some logging?

    e.g.

    when HTTP_REQUEST { 
      log local0. "client=[IP::client_addr]:[TCP::client_port] host=[HTTP::host] uri=[HTTP::uri]"
      switch [string tolower [HTTP::host]] { 
        "enoclubricants.com" { pool ENOCLUBRICANTSPP1 } 
        "enocvettingsiredev.enoc.com" { pool ENOCVETTING } 
        "wrench.enoc.com" { pool WRENCH_POOL } 
        default { 
           Use pool attached to virtual - no action required 
        } 
      } 
    }
    when HTTP_RESPONSE {
      log local0. "client=[IP::client_addr]:[TCP::client_port] pool=[LB::server pool]"
    }