How to block specific IPs with nginx

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.

maybe

deny xxx.xxx.xxx.xxx;
allow all;

“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).