Forum Discussion
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.
- Vikneswaran_709Nimbostratus
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.
- Vikneswaran_709Nimbostratus
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.
- Vikneswaran_709Nimbostratus
Just to update, SSL offloading is not in LB and the virtual server is configured with Performance (Layer 4) and fastL4
- Kevin_StewartEmployee
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.
- Vikneswaran_709Nimbostratus
how to redirect any HTTPS request to HTTP
- Kevin_StewartEmployee
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.
- Vikneswaran_709Nimbostratus
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.
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com