Advanced Maintenance

AMP Admin admin at ampprod.com
Thu Jul 2 07:06:11 MSD 2009


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.

-----Original Message-----
From: owner-nginx at sysoev.ru [mailto:owner-nginx at sysoev.ru] On Behalf Of
Maxim Dounin
Sent: Wednesday, July 01, 2009 6:19 PM
To: nginx at sysoev.ru
Subject: Re: Advanced Maintenance

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