​Hello,​

On Sat, Dec 7, 2013 at 6:31 PM, Ian Evans <ianev...@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.*
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to