这个更容易实现 www.nginx.net作者: 剑心通明 时间: 2008-07-12 10:48
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.作者: 剑心通明 时间: 2008-07-12 10:49
很奇怪的是,我按这个加了也不管用作者: 剑心通明 时间: 2008-07-12 10:50
ports安装nginx的,把所有http开头的模块都装了,但是nginx -V却没有ngx_http_access_module作者: litiger 时间: 2008-07-13 17:33
最近怎么都开始研究nginx了?呵呵!配置文件还很不熟悉,没apache用着顺手!作者: tecer 时间: 2008-07-13 18:38
提示: 作者被禁止或删除 内容自动屏蔽