Update README.md

pull/169/head
hzhking 2024-03-17 20:13:56 +08:00 committed by GitHub
parent 314a2f62ec
commit ac2bd7246b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 19 additions and 16 deletions

View File

@ -30,15 +30,17 @@ nginx安装路径假设为:/usr/local/nginx/conf/
把ngx_lua_waf下载到conf目录下,解压命名为waf
在nginx.conf的http段添加
```
lua_package_path "/usr/local/nginx/conf/waf/?.lua";
lua_shared_dict limit 10m;
init_by_lua_file /usr/local/nginx/conf/waf/init.lua;
access_by_lua_file /usr/local/nginx/conf/waf/waf.lua;
```
配置config.lua里的waf规则目录(一般在waf/conf/目录下)
RulePath = "/usr/local/nginx/conf/waf/wafconf/"
`RulePath = "/usr/local/nginx/conf/waf/wafconf/"`
绝对路径如有变动,需对应修改
@ -46,7 +48,7 @@ nginx安装路径假设为:/usr/local/nginx/conf/
### 配置文件详细说明:
```
RulePath = "/usr/local/nginx/conf/waf/wafconf/"
--规则存放目录
attacklog = "off"
@ -77,6 +79,7 @@ nginx安装路径假设为:/usr/local/nginx/conf/
html=[[Please go away~~]]
--警告内容,可在中括号内自定义
备注:不要乱动双引号,区分大小写
```
### 检查规则是否生效