Maintenance message pages

Alexander Staubo alex at purefiction.net
Mon Aug 6 20:02:47 MSD 2007


On 8/6/07, Brice Figureau <brice+nginx at daysofwonder.com> wrote:
> I think you should return an HTTP code 503.
>
> This mught fix your two points (at least the first one) and also forbid
> any robot (like googlebot or such) to index your maintenance page in
> place of the regular page usually found at this place...

Didn't think of that -- good point.

> What I'm usually doing is:
>
>   if (-f $document_root/.maintenance) {
>         return 503;
>   }
>   error_page 503 /maintenance.html;
>
> or a variation of the above configuration.

You're right, this fixes the POST issue. It doesn't fix the AJAX
problem -- is there any way I can check for the presence of an HTTP
header in an "if" expression?

Alexander.





More information about the nginx mailing list