Advanced Maintenance

Edho P Arief edhoprima at gmail.com
Thu Jul 2 07:37:47 MSD 2009


On Thu, Jul 2, 2009 at 10:06 AM, AMP Admin<admin at ampprod.com> wrote:
> I don't understand.  How do we make the "no maintenance checks"?  sorry, I'm
> still learning.
>
> If we want everything but privacypolicy.php, images directory and promo
> directory to go to maintenance how would that look?
>
> It seems that this puts the entire site in maintenance mode:
> Location / {
>        if (-f $document_root/maintenance.php) {
>                rewrite  ^(.*)$  /maintenance.php last;
>                break;
>        }
> }
>
> I'm not sure how to do the no maintenance part.
>

location ~ ^/(?!privacypolicy.php|images|promo) {
  try_files /maintenance.php $uri @fallback;
}

-- 
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org





More information about the nginx mailing list