Welcome! Log In Create A New Profile

Advanced

Re: Advanced Maintenance

W. Andrew Loe III
July 05, 2009 01:14PM
I wrote a little article on doing this:

http://onehub.com/past/2009/3/6/rails_maintenance_pages_done_right/

On Thu, Jul 2, 2009 at 8:24 AM, Maxim Dounin<mdounin@mdounin.ru> wrote:
> Hello!
>
> On Thu, Jul 02, 2009 at 07:52:42AM -0500, AMP Admin wrote:
>
>> Ohhh... i was looking for a not operator like '!'.  thanks, I'll give that a try!
>
> It's much better to just configure normal more specific locations instead
> of using regexps, e.g.
>
> location / {
>    # maintanance checks here
> }
>
> location /maintanance.php {
>    # no checks here
> }
>
> location /privacypolicy.php {
>    # and no checks here
> }
>
> location /images/ {
>    # and no checks here
> }
>
> location /promo/ {
>    # and no checks here
> }
>
> Each request will be processed in most-specific location, and
> hence there would be no maintanance checks for privacypolicy.php,
> images and promo (and maintanance.php itself).
>
> Maxim Dounin
>
>
>>
>> -----Original Message-----
>> From: owner-nginx@sysoev.ru [mailto:owner-nginx@sysoev.ru] On Behalf Of Edho P Arief
>> Sent: Wednesday, July 01, 2009 10:38 PM
>> To: nginx@sysoev.ru
>> Subject: Re: Advanced Maintenance
>>
>> On Thu, Jul 2, 2009 at 10:06 AM, AMP Admin<admin@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
>>
>>
>
>
Subject Author Posted

Advanced Maintenance

AMP Admin July 01, 2009 01:44PM

Re: Advanced Maintenance

Maxim Dounin July 01, 2009 07:19PM

RE: Advanced Maintenance

AMP Admin July 01, 2009 11:06PM

Re: Advanced Maintenance

edogawaconan July 01, 2009 11:37PM

RE: Advanced Maintenance

AMP Admin July 02, 2009 08:52AM

Re: Advanced Maintenance

Maxim Dounin July 02, 2009 11:24AM

Re: Advanced Maintenance

W. Andrew Loe III July 05, 2009 01:14PM

Re: Advanced Maintenance

merlin corey July 06, 2009 08:43PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 212
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready