Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

modsecurity_rules_file directive Rules error

I use this guide for add ModSecurity Nginx module

https://www.nginx.com/blog/compiling-and-installing-modsecurity-for-open-source-nginx/

and create Dockerfile

https://github.com/mhosseinz75/nginx-modsecurity/blob/master/Dockerfile

and I have this bug for build image

2019/03/09 08:50:17 [emerg] 1#1: "modsecurity_rules_file" directive Rules error. File: /etc/nginx/modsec/modsecurity.conf. Line: 236. Column: 17. Failed to locate the unicode map file from: unicode.mapping Looking at: 'unicode.mapping', 'unicode.mapping', '/etc/nginx/modsec/unicode.mapping', '/etc/nginx/modsec/unicode.mapping'. in /etc/nginx/conf.d/default.conf:5 nginx: [emerg] "modsecurity_rules_file" directive Rules error. File: /etc/nginx/modsec/modsecurity.conf. Line: 236. Column: 17. Failed to locate the unicode map file from: unicode.mapping Looking at: 'unicode.mapping', 'unicode.mapping', '/etc/nginx/modsec/unicode.mapping', '/etc/nginx/modsec/unicode.mapping'. in /etc/nginx/conf.d/default.conf:5

nginx:1.14

modsecurity V3

like image 460
Mhz Avatar asked Nov 22 '25 12:11

Mhz


1 Answers

you can check this issue on github. worked for me. Copy the file /opt/ModSecurity/unicode.mapping to the location where you placed the modsecurity.conf https://github.com/SpiderLabs/ModSecurity/issues/1941

like image 93
user3227783 Avatar answered Nov 25 '25 10:11

user3227783