Forum Discussion
static_19526
Jul 25, 2012Nimbostratus
Adding an image to maintenance page/sorry page
I am looking for a way to bring up a maintenance page/sorry page which included both text and an image.
We currently have a maintenance page which only displays text but now we would like to...
CraigM_17826
Jul 25, 2012Altocumulus
Hi,
about time I gave back to this wonderfull community. Now I am not saying this is the best way of doing things, and it doesn;t actually answer your original quastion, but it is an alternative method of acheiving what you want and without the need to swap in/out iRules. In fact there is no iRule change required at all which is what I like obout this solution. All I will say is that it works quite well for our environment.
Essentially we have a IIS server that hosts our maintanence and site down pages. The IIS server is in it's own pool and has a health monitor so it can be correctly detected as being up/down.
When we need the maintanence page up we simply start the IIS virtual web server and the iRule code detects this and then pools all traffic off to the IIS box. When the maint period is over we simply stop the IIS virtual server and the iRule code detects this and allows the traffic through.
So, what we have is this
1. An IIS box which servers our maintenance page.
2. A pool which contains this IIS server
3. A working health monitor
4. I iRule that does a member check on the IIS pool and if the acitve member count is 1 or more then we divert to the maint page. If the count is less than 1 then let the traffic through.
We also do some IP filtering as well so internally our developers can access and test the site before allowing access to the public. We do this by habing a data group containng the network addresses of our internal systems. The iRule then checks to see if the clients remote address is one of our internal address or not, and if not then they get the maint page.
Here's the bit of code from our iRule.
If bookedmarked pages are used, for a redirect to / because the holding page does not have
set raddr [IP::client_addr]
if { [active_members Prod_Holding_Page] >= 1 && not [class match $raddr equals Internal_IPs ] } {
pool Prod_Holding_Page
return
}
where Internal_IPs is the data group containing the list of internal IP addresses/networks.
We do a similar test to automatically display our sitedown page, without the IP restirctions. Basically if all pool members are down in our webserver pool then we pool to the IIS virtual server hosting the site down page.
Of course you could just do HTTP::redirects instead of pools. Our requirememt was that we had to maintain the web address, so using pools seemed the logical way to do it.
I am sure there are many approaches to this, this is just mine. I hope it is of some use to you.
Regards,
Craig
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