Forum Discussion

Vikneswaran_709's avatar
Vikneswaran_709
Icon for Nimbostratus rankNimbostratus
Aug 26, 2015

Maintenance Page using irule

Hi All,

 

When a request hits the virtual server (HTTPS or HTTP), it should load the customized Maintenance Page irrespective of Pool member status. The maintenance page is a html file which i have stored in /var/tmp directory of the load balancer.

 

We will enable the irule if customer requested for a maintenance window otherwise it will be removed from the virtual server.

 

I am new to irule. So help me with the irule.

 

  • No. We dont have CDN. Also i am not able to make it smaller. I tried compressing the file and still its not reduced.

     

    But i created the Data group with string with base64 and created the below irule:

     

    when HTTP_REQUEST { { HTTP::respond 200 content [lindex $::hal_logo_class 0]] "Content-Type" "image/png" } } }

     

    • Now when i hit the virtual server, its showing output as "hal_logo_class" in the browser. Please help me to fix the issue.
  • Hi Kevin/Arie,

     

    i have successfully configured irule for HTTP virtual server and below are the details :

     

    when HTTP_REQUEST { HTTP::respond 200 content [class element -value 0 maint_index_html_class2 ] "Content-Type" "text/html" }

     

    Now i want to do it for HTTPS . Please guide me.

     

  • Just to update, SSL offloading is not in LB and the virtual server is configured with Performance (Layer 4) and fastL4

     

  • In order to use the above iRule in an HTTPS VIP, you need a client SSL profile (for SSL offload) and an HTTP profile in a Standard type virtual server.

     

  • how to redirect any HTTPS request to HTTP

     

    Can you clarify why you'd need to do that? The content that you're presenting in this maintenance page doesn't require any additional HTTP or HTTPS access. You can run this code on any HTTP or HTTPS virtual server without issue. You just need to terminate the SSL in the HTTPS VIP with a client SSL profile and have an HTTP profile applied to both VIPs.

     

  • i tried that by configuring a default ssl profile and change the type to standard & configured http. After that applied the same irule. It worked. as a backup plan, i thought of redirect https to http.