Disabled default modsecurity_rules_file if modsecurity-snippet is specifed
The default modsecurity_rules_file overwrites the ModSecurity-snippet if it is specified with custom config settings like "SecRuleEngine On". This will not let Modsecurity be in blocking mode even if "SecRuleEngine On" is specified in the ModSecurity-snippet configuration
This commit is contained in:
parent
84db822a94
commit
f9b6e70d01
1 changed files with 5 additions and 2 deletions
|
@ -154,9 +154,12 @@ http {
|
||||||
{{ $all.Cfg.ModsecuritySnippet }}
|
{{ $all.Cfg.ModsecuritySnippet }}
|
||||||
';
|
';
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if (not (empty $all.Cfg.ModsecuritySnippet)) }}
|
||||||
|
# modsecurity_rules_file /etc/nginx/modsecurity/modsecurity.conf;
|
||||||
|
{{ else }}
|
||||||
modsecurity_rules_file /etc/nginx/modsecurity/modsecurity.conf;
|
modsecurity_rules_file /etc/nginx/modsecurity/modsecurity.conf;
|
||||||
|
{{ end }}
|
||||||
{{ if $all.Cfg.EnableOWASPCoreRules }}
|
{{ if $all.Cfg.EnableOWASPCoreRules }}
|
||||||
modsecurity_rules_file /etc/nginx/owasp-modsecurity-crs/nginx-modsecurity.conf;
|
modsecurity_rules_file /etc/nginx/owasp-modsecurity-crs/nginx-modsecurity.conf;
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Reference in a new issue