Ошибка «unknown directive modsecurity» при включении WAF
Симптомы
Включение WAF для сайта заканчивается ошибкой:
An error occurred while working with the websites. An attempt to test configuration of the web-server while saving the file ""; failed: nginx: [emerg] unknown directive 'modsecurity' in /etc/nginx/vhosts/modsec_36P13O/modsecpmGFVG.conf:2 nginx: configuration file /etc/nginx/nginx.conf test failedПричины
Директория с модулями Nginx не подключена в конфигурации.
Решение
В конфигурации Nginx по пути /etc/nginx/nginx.conf добавьте следующую строку:
include /etc/nginx/modules-enabled/*.conf;