Forum Discussion
Eddy_161863
Nimbostratus
Jul 07, 2016Host a HTML Maintenance Page on LTM
Hi,
I am trying to create an irule to host a maintenance page. The problem is the content is not displayed in the center and I if I try to add images, iRule is not accepting it and giving me er...
Yann_Desmarest
Cirrus
Jul 07, 2016Hi,
you can use the following irule as an alternative. It's working perfect on several production environments :
when CLIENT_ACCEPTED {
set default_pool [LB::server pool]
}
when HTTP_REQUEST {
if { [active_members $default_pool] < 1 } {
HTTP::respond 200 content [ifile get "/Common/maintenance.html"] noserver "Content-Type" "text/html" "Cache-Control" "no-cache, must-revalidate"
}
}
when LB_FAILED {
HTTP::respond 200 content [ifile get "/Common/maintenance.html"] noserver "Content-Type" "text/html" "Cache-Control" "no-cache, must-revalidate"
}
Eddy_161863
Nimbostratus
Jul 14, 2016Hi Yann, thanks for the Irule, our requirement is only to show maintenance page if the whole VIP is down i.e. none of the servers are operational.
So I guess I will just use the last condition in your iRule?
And also, how can we use a logo in the iFile? do I just import a picture directly as an iFile on f5?
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects