Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral


Questions and Answers

Loading... Loading...

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 Answer(s):

Do the multiple sites each use a different SSL certificate?
No they all use the same cert
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 }
 }
}

Your answer:

You must be logged in to reply. You can login here.