Skip to content
nginx module allows limiting access to certain http request methods and client addresses.
C
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/c
.gitignore
LICENSE
README.md

README.md

Nginx-Access-Plus

Nginx-Access-Plus is a Nginx module allows limiting access to certain http request methods and client addresses.

Installation

#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

User Guide

Only Allow GET and HEAD Requests

location / {
    allow_method all get|head;
    deny_method  all all;
}

All GET|HEAD Requests But Deny All POST|DELETE Requests Except for 192.168.1.*

location / {
    allow_method all get|head;
    allow_method 192.168.1.0/24 post|delete;
    deny_method  all all;
}

Deny POST|PUT|DELETE Requests from 192.168.1.*

location / {
    deny_method  192.168.1.0/24 post|put|delete;
}

License

Copyright © 2015 Zhang, Yuexiang (xfeep) and released under the BSD 3-Clause license.

You can’t perform that action at this time.