Forum Discussion

Angelo's avatar
Angelo
Icon for Nimbostratus rankNimbostratus
Jan 22, 2013

multiple sites on HTTP and HTTPS

Hi

 

 

I got a request to add multiple web-site on my F5 but i have IP limitations. I have rule for one site to work on http and https but how will i add multiple web-sites to this rule...

 

when CLIENT_ACCEPTED {

 

 

switch [TCP::local_port] {

 

80 {

 

SSL::disable clientside

 

SSL::disable serverside

 

pool pool_dev3RB_http

 

}

 

443 {

 

pool pool_dev3RB_https

 

}

 

default {

 

reject

 

}

 

}

 

}

 

3 Replies

  • OK great.So, I think all you'll want to do is remove the pool commands from the CLIENT_ACCEPTED event and then lookup the requested hostname in the HTTP_REQUEST even and specify the pools there. Something like this;

    
    when CLIENT_ACCEPTED {
     switch [TCP::local_port] {
      80 {   SSL::disable clientside
             SSL::disable serverside
             return
      }
      443 {
            return
      }
      default {
             reject
      }
     }
    }
    when HTTP_REQUEST {
     switch [string tolower [HTTP::host]] {
      "www.test.com" -
      "www.example.com" { pool number1 }
      "www.something.com" { pool number2 }
      "www.testing.com" { pool number3 }
      If HTTP host is none of the above, take the default action below
      default {
       reject }
     }
    }