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
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With