ngx_http_access_module
作用: ngx_http_access_module模块允许限制对某些客户端地址的访问
指令:
allow:
语法:allow
address
| CIDR
| unix:
| all
;
默认值:空
应用位置:http
, server
, location
, limit_except
deny:
语法:
allow
address
| CIDR
| unix:
| all
;
默认值:空
应用位置:http
, server
, location
, limit_except
案例:
location / { deny 192.168.1.1; allow 192.168.1.0/24; allow 10.1.1.0/16; allow 2001:0db8::/32; deny all; }