• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Issue Nginx: unknown directive "modsecurity" when try to activate Comodo (modsecurity)

andreios

Regular Pleskian
Server operating system version
Ubuntu 24.04
Plesk version and microupdate number
18.0.62 #2
nginx: [emerg] unknown directive "modsecurity" in /etc/nginx/conf.d/modsecurity.conf:5
nginx: configuration file /etc/nginx/nginx.conf test failed
Shouldn't this work out of the box or am I missing something?
 
It should. However I am not sure what exactly is causing that error. I can't find any other reports from users with the same issue.

From what I can piece together from Googling around is that maybe modsecurity isn't loaded correctly. So you could try (if you haven't already) to uninstall the modsecurity component in Plesk and re-install it afterwards.
 
Have tried to reinstall. It is there.

dpkg -l |grep mod-security
ii mod-security-v3 3.0.12-v.ubuntu.24.04+p18.0.61.0+t240430.0818 amd64 Open source, cross-platform, web server WAF module library with nginx support
 
I see, unfortunately I don't have any other recommendations to try. Best suggestion I have left is opening a support ticket to let our support engineers assist you with find the cause. To sign-in to support and open a ticket go to https://support.plesk.com.

If you got your license from a reseller, your reseller should provide support for you. If the reseller does not provide support, here is an alternative to get support directly from Plesk: https://support.plesk.com/hc/en-us/articles/12388090147095-How-to-get-support-directly-from-Plesk
 
Back
Top