load modsecurity.conf on ModSecurity.Enable

This commit is contained in:
MRoci 2019-05-13 17:39:06 +02:00
parent fafa0a6e13
commit 8b7f069b56
No known key found for this signature in database
GPG key ID: 1725CC5A23A2B45D

View file

@ -1104,14 +1104,14 @@ stream {
{{ if (or $location.ModSecurity.Enable $all.Cfg.EnableModsecurity) }}
modsecurity on;
modsecurity_rules_file /etc/nginx/modsecurity/modsecurity.conf;
{{ if $location.ModSecurity.Snippet }}
modsecurity_rules '
{{ $location.ModSecurity.Snippet }}
';
{{ else if (or $location.ModSecurity.OWASPRules $all.Cfg.EnableOWASPCoreRules) }}
modsecurity_rules_file /etc/nginx/owasp-modsecurity-crs/nginx-modsecurity.conf;
{{ else }}
modsecurity_rules_file /etc/nginx/modsecurity/modsecurity.conf;
{{ end }}
{{ if (not (empty $location.ModSecurity.TransactionID)) }}