set all apache sites offline with temporary static cached original pages

Posted by rubo77 on Server Fault See other posts from Server Fault or by rubo77
Published on 2012-11-02T08:39:12Z Indexed on 2012/11/02 11:03 UTC
Read the original article Hit count: 256

Filed under:
|
|
|
|

I would like to set all virtualhosts on my server down for maintenance for some time.

The temporary page should contain something like

sorry, the page www.xxx.com is down for maintenance. you can see the cached version here:

Then the trick: the user should then see the cached page from a cache like googlecache or similar for the requested page as long as the server is down.

This would show the correct content on pages, that are static anyway and give the visitor the needed content in many cases, while I can shut down mysql and other services that would usually be needed to show that pages.

How can I set a global page on all virtualhosts, that parses the original requested URL through PHP?

© Server Fault or respective owner

Related posts about apache2

Related posts about php