Fwd: How to use modsec in nginx include
Frank Gábor <[email protected]> Thu, 19 Nov 2020 19:28:22 +0100
| Newsgroups | gmane.comp.apache.mod-security.user |
|---|---|
| Message-ID | <CAE4HPjknW1b4HvFvHk_4riW7T4oog2p8-bE7MtDCS5C4uCCYow@mail.gmail.com> |
Hello,
i have an NGINX setup with many locations. I tried to clean up a bit and
wanted to move each location to an include file.
nginx.conf file:
load_module modules/ngx_http_modsecurity_module.so; http {
server {
location / { modsecurity on;
modsecurity_rules_file /nginx/conf/modsecurity.conf;
... }
}
}
Now if i try to move the location block to a separate file, lets say
"loacationA.conf", and include it in the nginx.conf like nginx.conf file:
load_module modules/ngx_http_modsecurity_module.so;
http {
server {
include locationA.conf
}
}
nginx -t gives me the error: nginx: [emerg] unknown directive "modsecurity"
in /nginx/conf/locationA.conf:1 Thank you,
Franky
--
Frank Gábor
_______________________________________________
mod-security-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mod-security-users
Commercial ModSecurity Rules and Support from Trustwave's SpiderLabs:
http://www.modsecurity.org/projects/commercial/rules/
http://www.modsecurity.org/projects/commercial/support/