Advanced Maintenance

Maxim Dounin mdounin at mdounin.ru
Thu Jul 2 03:19:21 MSD 2009


Hello!

On Wed, Jul 01, 2009 at 12:44:39PM -0500, AMP Admin wrote:

> I see lots of maintenance page solutions but I would like to keep serving
> images and a few directories.  Is that possible?
> 
> Right now we have:
> 	if (-f $document_root/maintenance.php) {
> 		rewrite  ^(.*)$  /maintenance.php last;
> 		break;
> 	}
> 
> But we would like to make the privacypolicy.php page and the images & promo
> directories always available.  That way people can always see our
> advertisers, images, and privacy policy.

Feel free to configure maintenance checks only in locations you 
need them.  E.g.

    location / {
        # maintenance checks here
        ...
    }

    location /always-visible {
        # no maintenance checks here
    }

Maxim Dounin

p.s. Please start a new thread when asking unrelated questions.  
Just hitting "reply" is a bad idea.





More information about the nginx mailing list