If you see this error on Redhat( or Centos) when you are testing config with nginx ( nginx -t or reload config) :
nginx: [emerg] Naxsi-Config : Incorrect line MainRule rx:select|union|update|delete|insert|table|from|ascii|hex|unhex|drop|load_file|substr|group_concat|dumpfile (./naxsi/naxsi_src/naxsi_skeleton.c/973)... in /etc/nginx/waf/naxsi_core.rules:23
This is solution to solved it :
1. Get naxsi from this url: https://github.com/wargio/naxsi by cmd:git clone --recurse-submodules https://github.com/wargio/naxsi.git2. Then re-compile modules follow the steps below:
- first cd into nginx directory then :
./configure --with-compat --add-dynamic-module=./naxsi/naxsi_src- and run :
make modules- After that copy module file into nginx modules directory: cp objs/ngx_http_naxsi_module.so /usr/lib64/nginx/modules/
Thanks Wargio !
Done !