установлен nginx / nginx-module-security / libmodsecurity по yum.
Основан в: /usr/lib64/nginx/modules/ngx_http_modsecurity_module.so
nginx.conf:
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
load_module /usr/lib64/nginx/modules/ngx_http_modsecurity_module.so;
events {
worker_connections 1024;
}
http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
include /etc/nginx/services/*.conf;
}
попробовать на VHOST:
location / {
ModSecurityEnabled on;
ModSecurityConfig /etc/nginx/modsec_includes.conf;
...
перезапуск службы nginx, ошибка, состояние systemctl nginx.service:
nginx: [emerg] unknown directive "ModSecurityEnabled" in {location path}
В чем проблема и как ее решить?