Skip to content
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

IncludeOptional error "modsecurity_rules_file" directive Rules error #338

Open
muuvmuuv opened this issue Jan 27, 2025 · 1 comment
Open

Comments

@muuvmuuv
Copy link

We have installed nginx-extras, libnginx-mod-http-modsecurity/stable,now 1.0.3-1+b2 and libnginx-mod-http-modsecurity/stable,now 1.0.3-1+b2.

Enabling (uncommenting) the ModSecurity lines produces the following error:

root@xxxxx:~# nginx -t
2025/01/27 09:43:06 [emerg] 80509#80509: "modsecurity_rules_file" directive Rules error. File: /etc/nginx/modsecurity_includes.conf. Line: 8. Column: 81. Invalid input:  IncludeOptional /etc/modsecurity/crs/REQUEST-900-EXCLUSION-RULES-BEFORE-CRS.conf in /etc/nginx/sites-enabled/default.conf:26
nginx: configuration file /etc/nginx/nginx.conf test failed

I have tested that if I change IncludeOptional to just Include it works.

@airween
Copy link
Member

airween commented Jan 27, 2025

Hi @muuvmuuv,

thanks for this report.
Unfortunately this is a know issue: libmodsecurity only knows Include, but not the IncludeOptional directive.

We should consider to add that.

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