Forum: NGINX How to block specific IPs with nginx

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Asif A. (Guest)
on 2009-02-06 13:53
(Received via mailing list)
Dear Group,

How do I create a block list?. I tried DENY but that does not work well
and
looks like it is only for blocking access to specific folders.

Please advise

regards

Asif A.
Andrius Semionovas (Guest)
on 2009-02-06 14:34
(Received via mailing list)
maybe

deny   xxx.xxx.xxx.xxx;
allow  all;
Merlin (Guest)
on 2009-02-10 21:53
(Received via mailing list)
"deny" should work in every context, according to:
http://wiki.codemongers.com/NginxHttpAccessModule#deny

If you have only achieved denying access to specific folders, this is
because you are placing the directives within a location block.
Instead,
move it up to the server block or the http block (to block on all
servers).
This topic is locked and can not be replied to.