Forum Discussion
7 Replies
Sort By
- JRahmAdminAssuming the requests are standard http, or you are terminating SSL on the LTM, this should work for you:
when HTTP_REQUEST { if { [string tolower [HTTP::host]] equals "url.mydomain.com" } { pool pool1 } elseif { [string tolower [HTTP::host]] equals "url2.mydomain.com" } { pool pool2 } else { pool default_pool } }
- PCarroll_70972NimbostratusThank you very much.
- JRahmAdminHTTP::host is the value supplied by the client in the host header. HTTP::uri is everything in the URL after the host.
- PCarroll_70972NimbostratusThank you once again.
- Marc_Bergeron_5NimbostratusCan you explain to me how this would work with SSL termination?
- Kirk_Bauer_1018NimbostratusYou can't do it with SSL, sorry. The SSL key exchange happens before the BIG-IP can see the Host header and thus the BIG-IP can't know which certificate to present to the client. So unless you want to use one certificate for both sites (which would cause browser warnings) then you are out of luck. The only option is if you can get a wildcard cert (for *.mydomain.com for example). This is a limitation of SSL, not the BIG-IP.
- Marc_Bergeron_5NimbostratusThat's exactly what I was thinking... you can't know which cert to use until you see the packet headers, and you can't get the packet headers without the cert.