{"id":892,"date":"2023-09-06T08:50:54","date_gmt":"2023-09-06T07:50:54","guid":{"rendered":"https:\/\/harmonweb.com\/blog\/?p=892"},"modified":"2023-09-06T08:50:54","modified_gmt":"2023-09-06T07:50:54","slug":"how-to-install-and-configure-modsecurity-in-cpanel","status":"publish","type":"post","link":"https:\/\/harmonweb.com\/blog\/how-to-install-and-configure-modsecurity-in-cpanel\/","title":{"rendered":"How To Install and Configure ModSecurity In cPanel"},"content":{"rendered":"\n<p>As soon as a web app goes online, automated attack bots bombard it with malicious requests. Attackers eventually target every website and eCommerce store in the hopes of discovering a vulnerability that they can exploit to inject code, misuse resources, or steal data. In 2019, bad bots accounted for one-quarter of all web traffic. Many features in cPanel and WHM assist web hosts and site administrators in repelling bad bots, including the ModSecurity web application firewall (WAF).<\/p>\n\n\n\n<p>For many years, cPanel and WHM have supported ModSecurity 2, and in cPanel 92, developers&nbsp;brought additional for ModSecurity 3. It should be noted that ModSecurity 3 support is experimental, but it provides a few significant benefits:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>ModSecurity 3 runs faster than previous versions.<\/li><li>It is not dependent on Apache and can be used alongside other web servers such as NGINX.<\/li><\/ul>\n\n\n\n<p>This article will explain what ModSecurity is and how to install and configure ModSecurity 3 on cPanel and WHM.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69d97bff4c894\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69d97bff4c894\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/harmonweb.com\/blog\/how-to-install-and-configure-modsecurity-in-cpanel\/#What_Is_Apache_ModSecurity_and_How_Does_It_Work\" >What Is Apache ModSecurity and How Does It Work?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/harmonweb.com\/blog\/how-to-install-and-configure-modsecurity-in-cpanel\/#How_to_Install_ModSecurity_in_cPanel\" >How to Install ModSecurity in cPanel<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/harmonweb.com\/blog\/how-to-install-and-configure-modsecurity-in-cpanel\/#Configuring_ModSecurity\" >Configuring ModSecurity<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/harmonweb.com\/blog\/how-to-install-and-configure-modsecurity-in-cpanel\/#ModSecurity_Configuration\" >ModSecurity Configuration<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/harmonweb.com\/blog\/how-to-install-and-configure-modsecurity-in-cpanel\/#ModSecurity_Tools\" >ModSecurity Tools<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/harmonweb.com\/blog\/how-to-install-and-configure-modsecurity-in-cpanel\/#ModSecurity_Vendors\" >ModSecurity Vendors<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/harmonweb.com\/blog\/how-to-install-and-configure-modsecurity-in-cpanel\/#Managing_ModSecurity_with_ModSecurity_SDBM_utility\" >Managing ModSecurity with ModSecurity SDBM utility<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/harmonweb.com\/blog\/how-to-install-and-configure-modsecurity-in-cpanel\/#How_To_Install_and_Configure_ModSecurity_In_cPanel\" >How To Install and Configure ModSecurity In cPanel<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_Is_Apache_ModSecurity_and_How_Does_It_Work\"><\/span><strong>What Is Apache ModSecurity and How Does It Work?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>ModSecurity is a firewall for web applications. It continuously monitors incoming web traffic for threats, blocking malicious connections before they reach applications. ModSecurity is a rule-based firewall that compares requests to a set of rules to look for patterns that match attacks like SQL injection, session hijacking, cross-site scripting, and others.<\/p>\n\n\n\n<p>Users can add their own rules to rule sets that are typically provided by a third party. The most popular is the Open Web Application Security Project (OWASP) Core Rule Set. It includes rules that protect web apps from a wide range of threats, including the OWASP Top Ten, a list of the most common attacks that is regularly updated.<\/p>\n\n\n\n<p>You may be wondering how web-application firewalls differ from the network firewall that already exists on your server. Do you require both? As discussed in How To Survive a DDoS Attack, network firewalls protect servers from malicious traffic at the network layer.<\/p>\n\n\n\n<p>Because they appear to be legitimate web requests, network firewalls such as CSF cannot filter attacks against web applications. WAFs, on the other hand, are designed to work at the application layer, identifying potentially harmful HTTP requests. If you host web apps on your cPanel server, you should use both a network firewall such as CSF and a WAF such as ModSecurity.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_Install_ModSecurity_in_cPanel\"><\/span><strong>How to Install ModSecurity in cPanel<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>You will need root access to your server to install ModSecurity 3, both on the command line with SSH and in WHM. You must first install the EasyApache4 experimental repository because ModSecurity 3 support is experimental.<\/p>\n\n\n\n<p>Log in to your server with SSH and run the following command:<\/p>\n\n\n\n<pre class=\"wp-block-verse\">yum install ea4-experimental<\/pre>\n\n\n\n<p>The connector that allows ModSecurity to communicate with a web server will then be installed. We offer two connectors, one for Apache and the other for NGINX. They can be added to the shell or the WHM.<\/p>\n\n\n\n<p>You must first uninstall ModSecurity 2:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>yum remove ea-apache24-mod_security2<\/code><\/pre>\n\n\n\n<p>Install the relevant connector in the shell using one of the following:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>yum install ea-modsec30-connector-apache24 \nyum install ea-modsec30-connector-nginx<\/code><\/pre>\n\n\n\n<p>In WHM:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Navigate to the&nbsp;<em>EasyApache4<\/em>&nbsp;page, which you will find in the&nbsp;<em>Software<\/em>&nbsp;section of the sidebar menu.<\/li><li>Click&nbsp;<em>Customize<\/em>&nbsp;under&nbsp;<em>Currently Installed Packages<\/em>.<\/li><li>Select the&nbsp;<em>Additional Packages<\/em>&nbsp;tab.<\/li><li>Click the switch next to&nbsp;<em>modsec30-connector-apache24<\/em>&nbsp;or&nbsp;<em>modsec30-connector-nginx<\/em><\/li><li>Select the&nbsp;<em>Review<\/em>&nbsp;tab, and click the&nbsp;<em>Provision<\/em>&nbsp;button at the bottom of the page.<\/li><\/ul>\n\n\n\n<p>cPanel will now install the connector and its dependencies.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"https:\/\/harmonweb.com\/blog\/wp-content\/uploads\/2022\/07\/image-9-1024x768.png?v=1657791634\" alt=\"\" class=\"wp-image-893\" srcset=\"https:\/\/harmonweb.com\/blog\/wp-content\/uploads\/2022\/07\/image-9-1024x768.png 1024w, https:\/\/harmonweb.com\/blog\/wp-content\/uploads\/2022\/07\/image-9-300x225.png 300w, https:\/\/harmonweb.com\/blog\/wp-content\/uploads\/2022\/07\/image-9-768x576.png 768w, https:\/\/harmonweb.com\/blog\/wp-content\/uploads\/2022\/07\/image-9-1536x1152.png 1536w, https:\/\/harmonweb.com\/blog\/wp-content\/uploads\/2022\/07\/image-9.png 1635w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Finally, we&#8217;ll install the OWASP Core Rule Set, which you can do in WHM by repeating the installation process described above for the modsec30-rules-owasp-crs package. You can also use the shell to install the RPM:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">yum install ea-modsec30-rules-owasp-crs<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Configuring_ModSecurity\"><\/span><strong>Configuring ModSecurity<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>We chose sensible defaults that should work for most web hosting environments, but we also provide tools in WHM&#8217;s Security Center for configuring ModSecurity and its rules.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"ModSecurity_Configuration\"><\/span><strong>ModSecurity Configuration<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"https:\/\/harmonweb.com\/blog\/wp-content\/uploads\/2022\/07\/image-18-1024x768.png?v=1658295742\" alt=\"\" class=\"wp-image-922\" srcset=\"https:\/\/harmonweb.com\/blog\/wp-content\/uploads\/2022\/07\/image-18-1024x768.png 1024w, https:\/\/harmonweb.com\/blog\/wp-content\/uploads\/2022\/07\/image-18-300x225.png 300w, https:\/\/harmonweb.com\/blog\/wp-content\/uploads\/2022\/07\/image-18-768x576.png 768w, https:\/\/harmonweb.com\/blog\/wp-content\/uploads\/2022\/07\/image-18-1536x1152.png 1536w, https:\/\/harmonweb.com\/blog\/wp-content\/uploads\/2022\/07\/image-18.png 1638w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>ModSecurity Configuration includes options for controlling the behavior of ModSecurity components such as the audit engine, rules engine, and connection engine. You can also configure the relevant paths and binaries in this interface if you want to use an external geolocation database or logging tool.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"ModSecurity_Tools\"><\/span><strong>ModSecurity Tools<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The primary interface for monitoring and configuring the firewall&#8217;s rules is ModSecurity Tools. The Hits List displays requests that triggered a rule and allows users to deactivate rules so that similar connections can be enabled in the future.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"766\" src=\"https:\/\/harmonweb.com\/blog\/wp-content\/uploads\/2022\/07\/image-19-1024x766.png?v=1658295858\" alt=\"\" class=\"wp-image-923\" srcset=\"https:\/\/harmonweb.com\/blog\/wp-content\/uploads\/2022\/07\/image-19-1024x766.png 1024w, https:\/\/harmonweb.com\/blog\/wp-content\/uploads\/2022\/07\/image-19-300x224.png 300w, https:\/\/harmonweb.com\/blog\/wp-content\/uploads\/2022\/07\/image-19-768x575.png 768w, https:\/\/harmonweb.com\/blog\/wp-content\/uploads\/2022\/07\/image-19-1536x1149.png 1536w, https:\/\/harmonweb.com\/blog\/wp-content\/uploads\/2022\/07\/image-19.png 1640w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>ModSecurity Tools also includes an interface for viewing and editing rules, as well as adding new rules using ModSecurity&#8217;s SecRules language.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"ModSecurity_Vendors\"><\/span><strong>ModSecurity Vendors<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Tools for adding and managing rule sets are included in ModSecurity Vendors. If you followed the instructions in the previous section, you should see the OWASP CRS rule set provided by cPanel, which you can activate or deactivate here, as well as control automatic updating. You can also enable and disable rule sets, such as IP reputation, WordPress exclusion, and scanner detection rules.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"https:\/\/harmonweb.com\/blog\/wp-content\/uploads\/2022\/07\/image-20-1024x768.png?v=1658296003\" alt=\"\" class=\"wp-image-924\" srcset=\"https:\/\/harmonweb.com\/blog\/wp-content\/uploads\/2022\/07\/image-20-1024x768.png 1024w, https:\/\/harmonweb.com\/blog\/wp-content\/uploads\/2022\/07\/image-20-300x225.png 300w, https:\/\/harmonweb.com\/blog\/wp-content\/uploads\/2022\/07\/image-20-768x576.png 768w, https:\/\/harmonweb.com\/blog\/wp-content\/uploads\/2022\/07\/image-20-1536x1152.png 1536w, https:\/\/harmonweb.com\/blog\/wp-content\/uploads\/2022\/07\/image-20.png 1640w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Hosting providers may prefer to develop their own rule set or buy one from a third-party vendor. ModSecurity Vendors also has functionality for adding and managing third-party rulesets.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Managing_ModSecurity_with_ModSecurity_SDBM_utility\"><\/span><strong>Managing ModSecurity with ModSecurity SDBM utility<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>ModSecurity saves information about IP addresses and requests in the \/var\/cpanel\/secdatadir\/ip.pag file. Because ModSecurity does not purge stale data, this file may consume an excessive amount of disk space over time. Install the ModSecurity SDBM utility if you want the system to automatically clean this cache.<\/p>\n\n\n\n<pre class=\"wp-block-verse\">yum install ea-modsec-sdbm-util<\/pre>\n\n\n\n<p>If the utility is installed, cPanel&#8217;s maintenance scripts will run it automatically, but you can also run it manually with the following command:<\/p>\n\n\n\n<pre class=\"wp-block-verse\">\/scripts\/shrink_modsec_ip_database -x<\/pre>\n\n\n\n<p>As a general rule, system administrators should delegate cache cleanup to maintenance scripts. If you choose to run the SDBM tool utility manually, restart Apache with:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/scripts\/restartsrv_httpd<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_To_Install_and_Configure_ModSecurity_In_cPanel\"><\/span>How To Install and Configure ModSecurity In cPanel<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"cPanel Tutorials - ModSecurity\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/gSdpMDJVIF4?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>As soon as a web app goes online, automated attack bots bombard it with malicious requests. Attackers eventually&hellip;<\/p>\n","protected":false},"author":1,"featured_media":932,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[158],"tags":[],"class_list":["post-892","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-troubleshooting"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How To Install and Configure ModSecurity In cPanel | HarmonWeb Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/harmonweb.com\/blog\/how-to-install-and-configure-modsecurity-in-cpanel\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Install and Configure ModSecurity In cPanel | HarmonWeb Blog\" \/>\n<meta property=\"og:description\" content=\"As soon as a web app goes online, automated attack bots bombard it with malicious requests. Attackers eventually&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/harmonweb.com\/blog\/how-to-install-and-configure-modsecurity-in-cpanel\/\" \/>\n<meta property=\"og:site_name\" content=\"HarmonWeb Blog\" \/>\n<meta property=\"article:published_time\" content=\"2023-09-06T07:50:54+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/harmonweb.com\/blog\/wp-content\/uploads\/2022\/07\/How-To-Install-and-Configure-ModSecurity-in-cPanel.png\" \/>\n\t<meta property=\"og:image:width\" content=\"2048\" \/>\n\t<meta property=\"og:image:height\" content=\"811\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"John Adegoke\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"John Adegoke\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/how-to-install-and-configure-modsecurity-in-cpanel\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/how-to-install-and-configure-modsecurity-in-cpanel\\\/\"},\"author\":{\"name\":\"John Adegoke\",\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/#\\\/schema\\\/person\\\/e9bc75c3e7e30a261690c47ec872a8fc\"},\"headline\":\"How To Install and Configure ModSecurity In cPanel\",\"datePublished\":\"2023-09-06T07:50:54+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/how-to-install-and-configure-modsecurity-in-cpanel\\\/\"},\"wordCount\":957,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/how-to-install-and-configure-modsecurity-in-cpanel\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/How-To-Install-and-Configure-ModSecurity-in-cPanel.png\",\"articleSection\":[\"Troubleshooting\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/harmonweb.com\\\/blog\\\/how-to-install-and-configure-modsecurity-in-cpanel\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/how-to-install-and-configure-modsecurity-in-cpanel\\\/\",\"url\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/how-to-install-and-configure-modsecurity-in-cpanel\\\/\",\"name\":\"How To Install and Configure ModSecurity In cPanel | HarmonWeb Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/how-to-install-and-configure-modsecurity-in-cpanel\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/how-to-install-and-configure-modsecurity-in-cpanel\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/How-To-Install-and-Configure-ModSecurity-in-cPanel.png\",\"datePublished\":\"2023-09-06T07:50:54+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/how-to-install-and-configure-modsecurity-in-cpanel\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/harmonweb.com\\\/blog\\\/how-to-install-and-configure-modsecurity-in-cpanel\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/how-to-install-and-configure-modsecurity-in-cpanel\\\/#primaryimage\",\"url\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/How-To-Install-and-Configure-ModSecurity-in-cPanel.png\",\"contentUrl\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/How-To-Install-and-Configure-ModSecurity-in-cPanel.png\",\"width\":2048,\"height\":811,\"caption\":\"How-To-Install-and-Configure-ModSecurity-in-cPanel.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/how-to-install-and-configure-modsecurity-in-cpanel\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How To Install and Configure ModSecurity In cPanel\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/\",\"name\":\"HarmonWeb Blog\",\"description\":\"HarmonWeb\",\"publisher\":{\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/#organization\",\"name\":\"HarmonWeb\",\"url\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/cropped-HARMON-WEB-LOGO-2.png\",\"contentUrl\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/cropped-HARMON-WEB-LOGO-2.png\",\"width\":831,\"height\":172,\"caption\":\"HarmonWeb\"},\"image\":{\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/#\\\/schema\\\/person\\\/e9bc75c3e7e30a261690c47ec872a8fc\",\"name\":\"John Adegoke\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/wp-content\\\/litespeed\\\/avatar\\\/0843e926db683e41ace2aee54210b841.jpg?ver=1775630058\",\"url\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/wp-content\\\/litespeed\\\/avatar\\\/0843e926db683e41ace2aee54210b841.jpg?ver=1775630058\",\"contentUrl\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/wp-content\\\/litespeed\\\/avatar\\\/0843e926db683e41ace2aee54210b841.jpg?ver=1775630058\",\"caption\":\"John Adegoke\"},\"sameAs\":[\"https:\\\/\\\/harmonweb.com\\\/blog\"],\"url\":\"https:\\\/\\\/harmonweb.com\\\/blog\\\/author\\\/harmonweb\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How To Install and Configure ModSecurity In cPanel | HarmonWeb Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/harmonweb.com\/blog\/how-to-install-and-configure-modsecurity-in-cpanel\/","og_locale":"en_US","og_type":"article","og_title":"How To Install and Configure ModSecurity In cPanel | HarmonWeb Blog","og_description":"As soon as a web app goes online, automated attack bots bombard it with malicious requests. Attackers eventually&hellip;","og_url":"https:\/\/harmonweb.com\/blog\/how-to-install-and-configure-modsecurity-in-cpanel\/","og_site_name":"HarmonWeb Blog","article_published_time":"2023-09-06T07:50:54+00:00","og_image":[{"width":2048,"height":811,"url":"https:\/\/harmonweb.com\/blog\/wp-content\/uploads\/2022\/07\/How-To-Install-and-Configure-ModSecurity-in-cPanel.png","type":"image\/png"}],"author":"John Adegoke","twitter_card":"summary_large_image","twitter_misc":{"Written by":"John Adegoke","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/harmonweb.com\/blog\/how-to-install-and-configure-modsecurity-in-cpanel\/#article","isPartOf":{"@id":"https:\/\/harmonweb.com\/blog\/how-to-install-and-configure-modsecurity-in-cpanel\/"},"author":{"name":"John Adegoke","@id":"https:\/\/harmonweb.com\/blog\/#\/schema\/person\/e9bc75c3e7e30a261690c47ec872a8fc"},"headline":"How To Install and Configure ModSecurity In cPanel","datePublished":"2023-09-06T07:50:54+00:00","mainEntityOfPage":{"@id":"https:\/\/harmonweb.com\/blog\/how-to-install-and-configure-modsecurity-in-cpanel\/"},"wordCount":957,"commentCount":0,"publisher":{"@id":"https:\/\/harmonweb.com\/blog\/#organization"},"image":{"@id":"https:\/\/harmonweb.com\/blog\/how-to-install-and-configure-modsecurity-in-cpanel\/#primaryimage"},"thumbnailUrl":"https:\/\/harmonweb.com\/blog\/wp-content\/uploads\/2022\/07\/How-To-Install-and-Configure-ModSecurity-in-cPanel.png","articleSection":["Troubleshooting"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/harmonweb.com\/blog\/how-to-install-and-configure-modsecurity-in-cpanel\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/harmonweb.com\/blog\/how-to-install-and-configure-modsecurity-in-cpanel\/","url":"https:\/\/harmonweb.com\/blog\/how-to-install-and-configure-modsecurity-in-cpanel\/","name":"How To Install and Configure ModSecurity In cPanel | HarmonWeb Blog","isPartOf":{"@id":"https:\/\/harmonweb.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/harmonweb.com\/blog\/how-to-install-and-configure-modsecurity-in-cpanel\/#primaryimage"},"image":{"@id":"https:\/\/harmonweb.com\/blog\/how-to-install-and-configure-modsecurity-in-cpanel\/#primaryimage"},"thumbnailUrl":"https:\/\/harmonweb.com\/blog\/wp-content\/uploads\/2022\/07\/How-To-Install-and-Configure-ModSecurity-in-cPanel.png","datePublished":"2023-09-06T07:50:54+00:00","breadcrumb":{"@id":"https:\/\/harmonweb.com\/blog\/how-to-install-and-configure-modsecurity-in-cpanel\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/harmonweb.com\/blog\/how-to-install-and-configure-modsecurity-in-cpanel\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/harmonweb.com\/blog\/how-to-install-and-configure-modsecurity-in-cpanel\/#primaryimage","url":"https:\/\/harmonweb.com\/blog\/wp-content\/uploads\/2022\/07\/How-To-Install-and-Configure-ModSecurity-in-cPanel.png","contentUrl":"https:\/\/harmonweb.com\/blog\/wp-content\/uploads\/2022\/07\/How-To-Install-and-Configure-ModSecurity-in-cPanel.png","width":2048,"height":811,"caption":"How-To-Install-and-Configure-ModSecurity-in-cPanel.png"},{"@type":"BreadcrumbList","@id":"https:\/\/harmonweb.com\/blog\/how-to-install-and-configure-modsecurity-in-cpanel\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/harmonweb.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How To Install and Configure ModSecurity In cPanel"}]},{"@type":"WebSite","@id":"https:\/\/harmonweb.com\/blog\/#website","url":"https:\/\/harmonweb.com\/blog\/","name":"HarmonWeb Blog","description":"HarmonWeb","publisher":{"@id":"https:\/\/harmonweb.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/harmonweb.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/harmonweb.com\/blog\/#organization","name":"HarmonWeb","url":"https:\/\/harmonweb.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/harmonweb.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/harmonweb.com\/blog\/wp-content\/uploads\/2020\/06\/cropped-HARMON-WEB-LOGO-2.png","contentUrl":"https:\/\/harmonweb.com\/blog\/wp-content\/uploads\/2020\/06\/cropped-HARMON-WEB-LOGO-2.png","width":831,"height":172,"caption":"HarmonWeb"},"image":{"@id":"https:\/\/harmonweb.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/harmonweb.com\/blog\/#\/schema\/person\/e9bc75c3e7e30a261690c47ec872a8fc","name":"John Adegoke","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/harmonweb.com\/blog\/wp-content\/litespeed\/avatar\/0843e926db683e41ace2aee54210b841.jpg?ver=1775630058","url":"https:\/\/harmonweb.com\/blog\/wp-content\/litespeed\/avatar\/0843e926db683e41ace2aee54210b841.jpg?ver=1775630058","contentUrl":"https:\/\/harmonweb.com\/blog\/wp-content\/litespeed\/avatar\/0843e926db683e41ace2aee54210b841.jpg?ver=1775630058","caption":"John Adegoke"},"sameAs":["https:\/\/harmonweb.com\/blog"],"url":"https:\/\/harmonweb.com\/blog\/author\/harmonweb\/"}]}},"_links":{"self":[{"href":"https:\/\/harmonweb.com\/blog\/wp-json\/wp\/v2\/posts\/892","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/harmonweb.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/harmonweb.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/harmonweb.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/harmonweb.com\/blog\/wp-json\/wp\/v2\/comments?post=892"}],"version-history":[{"count":2,"href":"https:\/\/harmonweb.com\/blog\/wp-json\/wp\/v2\/posts\/892\/revisions"}],"predecessor-version":[{"id":927,"href":"https:\/\/harmonweb.com\/blog\/wp-json\/wp\/v2\/posts\/892\/revisions\/927"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/harmonweb.com\/blog\/wp-json\/wp\/v2\/media\/932"}],"wp:attachment":[{"href":"https:\/\/harmonweb.com\/blog\/wp-json\/wp\/v2\/media?parent=892"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/harmonweb.com\/blog\/wp-json\/wp\/v2\/categories?post=892"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/harmonweb.com\/blog\/wp-json\/wp\/v2\/tags?post=892"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}