- 论坛徽章:
- 2
|
ngx_http_access_module
This module provides a simple host-based access control.
Module ngx_http_access_module makes it possible to control access for specific IP-addresses of clients. Rules are checked in the order of their record to the first match.
Example configuration
location / {
deny 192.168.1.1;
allow 192.168.1.0/24;
allow 10.1.1.0/16;
deny all;
}
In the above example access is only granted to networks 10.1.1.0/16 and 192.168.1.0/24 with the exception of the address 192.168.1.1.
When implementing many rules, it is generally better to use the ngx_http_geo_module. |
|