[Tracker-discuss] [issue80] Make it easy to display "down for maintenance" page, prerrably with a http status code that tells searchengines not to reindex page (503?)

Izak Burger metatracker at psf.upfronthosting.co.za
Tue Mar 27 00:39:41 CEST 2007


Izak Burger added the comment:

Martin v. Löwis wrote:
> For taking down the website, one way is to use the Apache asis module, e.g. 
> putting the attached file 'down' in a directory /www/asis, the adding a 
> configuration block
> 
> <Directory /www/asis>
>  SetHandler send-as-is
> </Directory>
> 
> On server outage, add
> 
> Alias /foo /www/asis/down

Another way is to generate an alternative virtualhost config in 
/etc/apache2/sites-available, and symlink it into 
/etc/apache2/sites-enabled in place of the production config, then call 
"apache2ctl graceful".  This alternative virtualhost should have 
mod_rewrite configured so that all url's get rewritten to a single 
document that states that the site is down.

Afterwards, symlink the production config back into place and call 
"apache2ctl graceful" again.

For example, here is one we use to suspend a site:

<VirtualHost *:80>
         ServerName suspended.localhost
         DocumentRoot /var/www/suspended/
         RewriteEngine on
         # Any url just ends up at the suspended page
         RewriteRule "!^/$" "/index.html" [L]
         <Directory /var/www/suspended/>
                 AllowOverride None
                 Order allow,deny
                 allow from all
         </Directory>
</VirtualHost>

regards,
Izak

----------
title: Make it easy to display "down for maintenance" page, prerrably with a http status code that tells searchengines not to reindex page (503?) -> Make it easy to display "down for maintenance" page,	prerrably with a http status code that tells searchengines not to	reindex page (503?)

______________________________________________________
Meta Tracker <metatracker at psf.upfronthosting.co.za>
<http://psf.upfronthosting.co.za/roundup/meta/issue80>
______________________________________________________


More information about the Tracker-discuss mailing list