Forum Discussion

Joshua_106551's avatar
Icon for Nimbostratus rankNimbostratus
Jun 16, 2011

http fallback host on a https Virtual Server

Hi All,


I am trying to build or find a Irule that will display a sorry page when the pool is down on a 443 URL. I found the following but it looks like it is missing a key portion on how to identify if the pool is up or down. For this URL, the 443 is a pass through as the servers are doing cert termination. I do have a ssl cert and profile per the Irule but I am not sure how the maintencace_redirect flag is getting set.





{ Set this flag to 1 to decrypt the SSL and send a redirect to the client. Set to 0 to pass the SSL through without decrypting it. set maintenance_redirect 1



0 log local0. "[IP::client_addr]:[TCP::client_port]: Received connection with maintenance flag set to $maintenance_redirect"



Check if the maintenance flag is disabled (set to 0)


if {$maintenance_redirect==0}{



Disable the client SSL profile so the HTTPS traffic is passed through encrypted to the node





Disable the HTTP profile as we're not going to redirect this request HTTP::disable log local0. "[IP::client_addr]:[TCP::client_port]: Maintenance flag is disabled"









The HTTP_REQUEST event is only triggered if the maintenance flag is enabled and the client SSL and HTTP profiles are left enabled



Redirect the client HTTP::redirect



log local0. "[IP::client_addr]:[TCP::client_port]: Redirecting request"





2 Replies

  • Hi Joshua,



    That's a manually enabled version of this codeshare example. If you want to automatically decrypt the SSL and send a redirect when the pool is down, you can use the full iRule: