Skip to content

Amazon-linux: unknown directive. #350

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Luke-SF opened this issue Apr 17, 2025 · 1 comment
Open

Amazon-linux: unknown directive. #350

Luke-SF opened this issue Apr 17, 2025 · 1 comment

Comments

@Luke-SF
Copy link

Luke-SF commented Apr 17, 2025

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?

@airween
Copy link
Member

airween commented Apr 17, 2025

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;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants