Maintenance mode for all but my ip

B.R. reallfqq-nginx at
Sat Dec 7 20:31:03 UTC 2013


On Sat, Dec 7, 2013 at 6:31 PM, Ian Evans <ianevans at> wrote:

> Thanks. I'll give this a spin. Is there anyway to still trigger the
> mapping based on the existence of a maintenance.whatever file? Just
> thinking of the ease of quickly touch'ing the maintenance file to trigger
> the mapping as opposed to fiddling with the conf and reloading each time
> you want to do some quick testing.

By giving it 30 seconds of intensive thinking, I am sure you could figure
this out by yourself, considering you already provided the if (-f ***)
{...} trick.

Since the'if'
directive works in server blocks, you could enclose the rewrite rule in it
to only apply 'maintenance mode' based on the presence (or the absence?) of
a specific file.

Please come back to tell us if it worked as intended/expected... or what
had to be corrected/added! :o)​

*B. R.*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list