wargio / naxsi

NAXSI is an open-source, high performance, low rules maintenance WAF for NGINX
GNU General Public License v3.0
306 stars 38 forks source link

separate log #32

Open rickygm opened 2 years ago

rickygm commented 2 years ago

Hi wargio , sorry to open a thread about this, but I see an addition in the github about separating the naxsi logs, do you have any example how to do it inside the naxsi/nginx settings .

wargio commented 2 years ago

where exactly?

rickygm commented 2 years ago

https://github.com/nbs-system/naxsi/commit/fe5df20167fe810c6a5297ed5f13cda70cf984ba

wargio commented 2 years ago

it should be like NaxsiLogFile "/path/to/file.log"; and it can go everywhere i think

rickygm commented 2 years ago

could go inside the naxsi.rules file?

wargio commented 2 years ago

guess so, according to the code it can go in NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LMT_CONF

rickygm commented 2 years ago

let me try and let you know, I was thinking and I don't know if you like this idea, why don't you bring the naxsi wiki and let's feed it.

wargio commented 2 years ago

what do you mean?

rickygm commented 2 years ago

put the naxsi/nbs-system wiki in your naxsi fork, and keep the wiki up to date, this separate log in naxsi is not in the wiki.

wargio commented 2 years ago

ah yeah. i was more thinking in having a wiki book or similar

rickygm commented 2 years ago

let me know what you think, and I did the tests by adding naxsi.rules inside.

NaxsiLogFile "/var/log/nginx/naxsi.log";

and it works.