Re: [mod-security-users] Fwd: How to use modsec in nginx include
Brought to you by:
victorhora,
zimmerletw
|
From: Ervin H. <ai...@gm...> - 2020-11-20 07:16:37
|
Hi Gábor,
On Thu, Nov 19, 2020 at 07:28:22PM +0100, Frank Gábor wrote:
> 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:
if "locationA.conf" is in same directory like "nginx.conf", it
will be loaded earlier. But nginx loads the module later.
Just an idea...
a.
|