Maintenance mode for all but my ip

B.R. reallfqq-nginx at
Sat Dec 7 15:19:03 UTC 2013


On Sat, Dec 7, 2013 at 4:10 PM, Jonathan Matthews
<contact at>wrote:

> >     rewrite ^.*$ $target #Redirecting all traffic according to
> map-assigned
> I don't particularly like ^^^ this. It seems like a level of
> indirection too far ;-)

​To me​, your solution looks double evil:
1°) Using an unneeded 'if' directive
2°) Needs modifying each and every location block.
Going that way, you could use the much simpler Paul's solution, denying all
blocks to everyone but the allowed IP address, that is copy-pasting 'deny'
and 'allow' directives​ everywhere...

I was trying to think about something more scalable, self-contained and
generic. ;o)
*B. R.*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list