Maintenance mode for all but my ip
B.R.
reallfqq-nginx at yahoo.fr
Sat Dec 7 20:31:03 UTC 2013
Hello,
On Sat, Dec 7, 2013 at 6:31 PM, Ian Evans <ianevans at digitalhit.com> 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 http://nginx.org/en/docs/http/ngx_http_rewrite_module.html#if'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: <http://mailman.nginx.org/pipermail/nginx/attachments/20131207/0e0636d9/attachment-0001.html>
More information about the nginx
mailing list