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.
A8b5da3407c1d4dc9666ce8ae8214a72?d=identicon&s=25 Asif Ali (Guest)
on 2009-02-06 12: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 Ali
D4fdbe62b825c010adf04da0f72571e9?d=identicon&s=25 Andrius Semionovas (Guest)
on 2009-02-06 13:34
(Received via mailing list)
maybe

deny   xxx.xxx.xxx.xxx;
allow  all;
561c2fb6d0c72e0c7bc52b263c7d56c3?d=identicon&s=25 Merlin (Guest)
on 2009-02-10 20: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.