On 7 December 2013 14:58, B.R. <reallfqq-nginx@yahoo.fr> wrote:
> I am new to the use of maps, but I suppose it would fit perfectly, using
> core variables such as the binary IP address:
[snip]
> rewrite ^.*$ $target #Redirecting all traffic according to map-assigned
I don't particularly like ^^^ this. It seems like a level of
indirection too far ;-)
Using /almost/ the same technique, you could have a map based on the
remote IP like BR suggested, but use it like this:
http {
map $remote_addr $not_me {
default 1;
my.ip.address "";
}
server {
# whatever else you need
location / {
if ($not_me) {
return 503
}
}
}
}
Cheers,
Jonathan
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx