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: un icode.mapping Looking at: ‘unicode.mapping’, ‘unicode.mapping’, ‘/etc/nginx/modsec/unicode.mapping’, ‘/etc/nginx/modsec/unicode.mapping’. in /etc/nginx/conf.d/proxy.conf:4nginx: configuration file /etc/nginx/nginx.conf
测试有报错
[root@localhost modsec]# nginx -t
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: un
icode.mapping Looking at: 'unicode.mapping', 'unicode.mapping', '/etc/nginx/modsec/unicode.mapping', '/etc/nginx/modsec/unicode.mapping'. in /etc/nginx/conf.d/proxy.conf:4nginx: configuration file /etc/nginx/nginx.conf test failed
报错解决:
编辑/etc/nginx/modsec/modsecurity.conf
,这一行改成
#SecUnicodeMapFile unicode.mapping 20127
测试正常
[root@localhost modsec]# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful