[mod-security-users] Fwd: How to use modsec in nginx include
Brought to you by:
victorhora,
zimmerletw
|
From: Frank G. <fra...@gm...> - 2020-11-19 18:28:51
|
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
|