测试有报错

[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

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

Captcha Code