ModSecurity-nginx
ModSecurity-nginx copied to clipboard
Amazon-linux: unknown directive.
I run the compilation in AWS-linux 2023 as in the readme:
$ ./build.sh
$ ./configure
$ make
$ sudo make install
Now it seems to complete but after restarting the standard Nginx package, with "modsecurity on" added to config, I get:
nginx: [emerg] unknown directive "modsecurity" in (config file)
Is there a step missing to recompile all of Nginx or, enable the module I compiled?
Hi @Luke-SF,
based on your information I assume you compiled the library (libmodsecurity3).
If you want to use that for your Nginx, you should compile the connector module too, and you need to enable that.
Here you can find information about compilation.
If you build the module as a dynamic module, you should load that with this line:
load_module modules/ngx_http_modsecurity_module.so;