Skip to content
  • Solutions
    By Role
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    By Infrastructure
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
  • Product
    • Plesk Features
    • Plesk Editions
    • What’s new
    • Pricing
    • Roadmap
    • Lifecycle Policy
    • Extensions Catalogue
  • Pricing
  • Extensions
    Featured Extensions
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    Bundles and packs:
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack

    See all Extensions

  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
Plesk 360 login
Free Trial

Knowledge Base

Unable to activate or change the ModSecurity ruleset in Plesk: /etc/httpd/conf.d/modsec2.imunify.conf No such file or directory

 
applications extensionsbackupfirewallgoimunify360

Symptoms

  • The following error is displayed in Plesk:

    httpd: Syntax error on line 353 of /etc/httpd/conf/httpd.conf: Syntax error on line 5 of /etc/httpd/conf.d/zz010_psa_httpd.conf: Syntax error on line 62 of /etc/httpd/conf/plesk.conf.d/server.conf: Syntax error on line 2 of /etc/httpd/conf/plesk.conf.d/modsecurity.conf: Could not open configuration file /etc/httpd/conf.d/modsec2.imunify.conf: No such file or directory

  • The file /etc/httpd/conf.d/modsec2.imunify.conf doesn't exist:

    # ls -lha "/etc/httpd/conf.d/modsec2.imunify.conf"
    ls: cannot access /etc/httpd/conf.d/modsec2.imunify.conf: No such file or directory

Cause

Imunify360 extension was removed and there are leftovers in the ModSecurity additional configuration.

Resolution

  1. Connect to the server via SSH.

  2. Back up the Custom Directives configuration file from ModSecurity:

    # cp -a /etc/httpd/conf/plesk.conf.d/modsecurity.conf /root/modsecurity.conf.backup

  3. Empty the Custom Directives configuration file from ModSecurity:

    # echo "" > /etc/httpd/conf/plesk.conf.d/modsecurity.conf

  4. Log in to Plesk.

  5. Go to Tools & Settings > Web Application Firewall (ModSecurity) and enable it with the necessary ModSecurity ruleset

    Note: In case it's necessary to use Imunify360 extension, uninstall and reinstall the extension back on the system

Tweet
Share
Share
Email
0 Shares
Read the full article
Related Posts

How to Host a Go App on Plesk

Read More »

You Are Always Safe When You Have an Up-To-Date Plesk Backup

Read More »

The Plesk HoliDeals Calendar is back (Part 1)

Read More »
Knowledge Base

A website is inaccessible when ModSecurity is enabled: Failed deleting collection (name “ip”, key “xxxxx”): Internal error

Read More »

Imunify360 not working on Ubuntu: Imunify service is not started

Read More »

Imunify360 extension in Plesk shows the error: License is invalid for this server

Read More »

How to disable ModSecurity in Plesk?

Read More »

Hosting Wiki

  • Django
  • Server Redundancy
  • Google Cloud CDN
  • AMP
  • Bare Metal Server
  • Backup
  • Oracle VM Server
  • Server Virtualization Software
  • Windows Server
  • Linux
  • MongoDB
  • Plesk
  • Web Server
  • DNS Server
  • SSH
  • Firewall
X-twitter Linkedin Youtube Reddit Github
  • Product
  • Login
  • Pricing
  • Editions
  • For Partners
  • Partner Program
  • Contributor Program
  • Affiliate Program
  • Plesk University
  • Company
  • Blog
  • Careers
  • Events
  • About Plesk
  • Our Brand
  • Resources
  • User and Admin guides
  • Help Center
  • Migrate to Plesk
  • Contact Us
  • Hosting Wiki
  • Forum
  • Legal
  • Legal
  • Privacy Policy
  • Imprint

© 2025 WebPros International GmbH

Part of the WebPros®  Family