Re: [Mod-security-developers] Enabling and disabling modsec per nginx site
Brought to you by:
victorhora,
zimmerletw
From: Ervin H. <ai...@gm...> - 2022-03-03 05:53:58
|
Hi, (just my 2 cents: I'm not sure this is the right list for your question. See available lists: https://sourceforge.net/p/mod-security/mailman/ I think the best choice is the https://sourceforge.net/projects/mod-security/lists/mod-security-users) On Wed, Mar 02, 2022 at 05:22:57PM -0800, s kwok wrote: > Hi, > > I'd like to ask if it is feasible to have modsec enabled for some nginx > sites and disabled for the rest altogether on the same server. Is it > recommended in terms of performance and stability? Thanks! yes, see documentation: https://github.com/SpiderLabs/ModSecurity-nginx#modsecurity modsecurity syntax: modsecurity on | off context: http, server, location default: off Turns on or off ModSecurity functionality. Note that this configuration directive is no longer related to the SecRule state. Instead, it now serves solely as an nginx flag to enable or disable the module. eg: server { listen 80; listen [::]:80; ... ... # Enable ModSecurity WAF, if need modsecurity on; location / { ... ... a. |