SSL profile selection

Hi,

I am developing an iRule which selects the server side SSL profile based on the Host name of the request. It is almost there but critically I am getting an error which…and I have tried lots of alternatives…seems to have stopped me in my tracks.

Can anyone point out where I am going wrong please.

iRule:

when HTTP_REQUEST {

set host [HTTP::host]

if { $host equals “www.f5petshop.co.uk”} {

pool PetShop_Pool_SSL

} else {

pool PetShop_Pool_Clear}

}

when SERVER_CONNECTED {

if { $host equals “www.f5petshop.co.uk”} {

SSL::profile PetShop

}

}

Error in log:

TCL error: Rule PetShop_SSL_Selection - wrong args: should be "SSL::profile " while executing “SSL::profile PetShop”

Hi Ed,

I think you need to have a server SSL profile enabled on the VIP before you can change to another one.

I tested with the default serverssl profile on the VIP and was able to change in the SERVER_CONNECTED event to another customised server SSL profile. When I removed the default serverssl profile from the VIP, I then got the same error you noted.

Aaron

Hi Aaron,

Works like a dream:-)

Thanks for your help. I’m very impressed.

Ed