http {node
...ip
geo $whiteiplist {
default 1;
include limit/whiteip.conf;
}rem
map $whiteiplist $limit {
1 $binary_remote_addr;
0 "";
}
limit_conn_zone $limit zone=myzone_bbs:10m;
limit_req_zone $limit zone=one:10m rate=15r/sit
...io
}map
location / {im
...vi
limit_conn myzone_bbs 20;
limit_req zone=one burst=15 nodelay;co
...location
}
vi limit/whiteip.conf
58.xx.xx.xx 0; #容許
210.xx.xx.xx 1; #拒絕