ADD-SP / ngx_waf

Handy, High performance, ModSecurity compatible Nginx firewall module & 方便、高性能、兼容 ModSecurity 的 Nginx 防火墙模块
https://add-sp.github.io/ngx_waf-docs/
BSD 3-Clause "New" or "Revised" License
1.49k stars 187 forks source link

nginx: [emerg] "waf_cc_deny" directive is not allowed her #106

Closed gongwenbin closed 2 years ago

gongwenbin commented 2 years ago

ngx_waf版本 current nginx版本:1.20.2 操作系统:centos7.9 现象: 1、将”waf_cc_deny on rate=10000r/m duration=10m zone=waf:cc; waf_cache on capacity=50;“ 加入到http段里面,会报错”nginx: [emerg] "waf_cc_deny" directive is not allowed here in /app/software/nginx/conf/nginx.conf:34 nginx: configuration file /app/software/nginx/conf/nginx.conf test failed“。 但是如果加入server则正常。

2、access_log /app/logs/nginx/waf_block.log waf if=$waf_blocking_log; 加入到http段里面不生效,需要加入到server方可。

ADD-SP commented 2 years ago

目前本模块不支持这两种写法。

ADD-SP commented 2 years ago

不过第二个现象确实需要加到文档里。