Nginx-Access-Plus is a Nginx module allows limiting access to certain http request methods and client addresses.
#If nginx source is checked out from hg, please replace ./configure with auto/configure
$./configure \
--add-module=nginx-access-plus/src/c
$ make
$ make install
location / {
allow_method all get|head;
deny_method all all;
}
location / {
allow_method all get|head;
allow_method 192.168.1.0/24 post|delete;
deny_method all all;
}
location / {
deny_method 192.168.1.0/24 post|put|delete;
}
Copyright © 2015 Zhang, Yuexiang (xfeep) and released under the BSD 3-Clause license.