{"id":16506,"date":"2014-12-02T12:47:26","date_gmt":"2014-12-02T18:47:26","guid":{"rendered":"https:\/\/secure.rosehosting.com\/blog\/?p=16506"},"modified":"2022-06-03T03:46:31","modified_gmt":"2022-06-03T08:46:31","slug":"how-to-install-mod_security-and-mod_evasive-on-an-ubuntu-14-04-vps","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/how-to-install-mod_security-and-mod_evasive-on-an-ubuntu-14-04-vps\/","title":{"rendered":"How to install mod_security and mod_evasive on an Ubuntu 14.04 VPS"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div><p><img decoding=\"async\" class=\"alignleft size-full wp-image-4695\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2014\/09\/mod-security-raise-up-your-apache-webserver-security-and-protect-against-cross-site-scripting-javascript-hacks-and-viruses.jpg\" alt=\"mod_security\" width=\"273\" height=\"101\" \/>Mod_security is an Apache module that helps to protect your website from various attacks such as cross-site scripting, SQL injection attacks, path traversal attacks etc. Mod_evasive is an Apache module that helps to prevent HTTP DoS (DDoS) attacks or server brute force attacks. If you have CentOS installed on your server, follow <a title=\"Install mod_security with the OWASP core rule set on a CentOS VPS\" href=\"https:\/\/www.rosehosting.com\/blog\/install-mod_security-with-the-owasp-core-rule-set-on-a-centos-vps\/\" target=\"_blank\" rel=\"noopener noreferrer\">these instructions<\/a> to install mod_security with the OWASP core rule set.<br \/>\nTo <strong>install and configure mod_security and mod_evasive modules on an <a title=\"Ubuntu VPS\" href=\"https:\/\/www.rosehosting.com\/ubuntu-hosting.html\" target=\"_blank\" rel=\"noopener noreferrer\">Ubuntu VPS<\/a><\/strong> in order to harden and secure your Apache web server, follow the steps described below:<\/p>\n<p><!--more--><\/p>\n<p>Make sure that all OS packages are up to date:<\/p>\n<pre>sudo apt-get update\r\nsudo apt-get upgrade<\/pre>\n<p>Install mod-security and mod-evasive using the following command:<\/p>\n<pre>sudo apt-get install libapache2-mod-security2 libapache2-modsecurity libapache2-mod-evasive<\/pre>\n<p>To enable the mod_security rules, copy the recommended mod_security configuration file, then edit it and set the &#8216;SecRuleEngine&#8217; option to On:<\/p>\n<pre>sudo cp \/etc\/modsecurity\/modsecurity.conf{-recommended,}\r\nsudo vi \/etc\/modsecurity\/modsecurity.conf<\/pre>\n<pre>SecRuleEngine On<\/pre>\n<p>Also, it is a good idea to increase the &#8216;SecRequestBodyLimit&#8217; value to the maximum size of files you would accept uploaded to the server, for example set it to 32 MB and disallow mod_security to access response bodies to save some server resources:<\/p>\n<pre>SecRequestBodyLimit 32768000\r\nSecRequestBodyInMemoryLimit 32768000\r\nSecResponseBodyAccess Off<\/pre>\n<p>The mod_security rules are available in following directories:<\/p>\n<pre>\/usr\/share\/modsecurity-crs\/base_rules\r\n\/usr\/share\/modsecurity-crs\/optional_rules\r\n\/usr\/share\/modsecurity-crs\/experimental_rules<\/pre>\n<p>To enable all of the CRS base rules, create symbolic links using the following command:<\/p>\n<pre>sudo ln -s \/usr\/share\/modsecurity-crs\/base_rules\/*.conf \/usr\/share\/modsecurity-crs\/activated_rules\/<\/pre>\n<p>To enable the CRS optional and experimental rules files you want to use, create symbolic links under the &#8216;activated_rules&#8217; directory location accordingly.<\/p>\n<p>It is recommended to download and configure OWASP (Open Web Application Security Project) core rule set:<\/p>\n<pre>sudo apt-get install git\r\nsudo git clone https:\/\/github.com\/SpiderLabs\/owasp-modsecurity-crs.git\r\nsudo mv \/usr\/share\/modsecurity-crs \/usr\/share\/modsecurity-crs.bak\r\nsudo mv owasp-modsecurity-crs \/usr\/share\/modsecurity-crs\r\nsudo mv \/usr\/share\/modsecurity-crs\/crs-setup.conf.example \/usr\/share\/modsecurity-crs\/crs-setup.conf<\/pre>\n<p>Edit the following files:<\/p>\n<pre>sudo vi \/usr\/share\/modsecurity-crs\/activated_rules\/modsecurity_crs_35_bad_robots.conf<\/pre>\n<p>comment lines 16, 21 and 28:<\/p>\n<pre>#SecRule REQUEST_HEADERS:User-Agent \"@pmFromFile modsecurity_35_bad_robots.data\" \\\r\n#SecRule REQUEST_HEADERS:User-Agent \"@pmFromFile modsecurity_35_bad_robots.data\" \\\r\n#SecRule REQUEST_HEADERS:User-Agent<\/pre>\n<pre>sudo vi \/usr\/share\/modsecurity-crs\/activated_rules\/modsecurity_crs_40_generic_attacks.conf<\/pre>\n<p>comment line 169:<\/p>\n<pre>#SecRule REQUEST_COOKIES|!REQUEST_COOKIES:\/__utm\/|!REQUEST_COOKIES:\/_pk_ref\/|REQUEST_COOKIES_NAMES|ARGS_NAMES|ARGS|XML:\/* \"@pmFromFile modsecurity_40_generic_attacks.data\" \\<\/pre>\n<pre>sudo vi \/usr\/share\/modsecurity-crs\/activated_rules\/modsecurity_crs_50_outbound.conf<\/pre>\n<p>comment line 101:<\/p>\n<pre>#SecRule RESPONSE_BODY \"!@pmFromFile modsecurity_50_outbound.data\" \\<\/pre>\n<p>Configure mod_evasive module:<br \/>\n&lt;pre&gt;sudo vi \/etc\/apache2\/mods-available\/mod-evasive.conf&lt;\/pre&gt;<\/p>\n<pre>&lt;ifmodule mod_evasive20.c&gt;\r\n\u00a0\u00a0 DOSHashTableSize 3097\r\n\u00a0\u00a0 DOSPageCount\u00a0 10\r\n\u00a0\u00a0 DOSSiteCount\u00a0 30\r\n\u00a0\u00a0 DOSPageInterval 1\r\n\u00a0\u00a0 DOSSiteInterval\u00a0 3\r\n\u00a0\u00a0 DOSBlockingPeriod\u00a0 3600\r\n\u00a0\u00a0 DOSLogDir\u00a0\u00a0 \/var\/log\/apache2\/mod_evasive.log\r\n&lt;\/ifmodule&gt;<\/pre>\n<p>See the README file included with mod_evasive for details on the various config parameters.<\/p>\n<p>Create log file for mod_evasive:<\/p>\n<pre>touch \/var\/log\/apache2\/mod_evasive.log\r\nsudo chown www-data:www-data \/var\/log\/apache2\/mod_evasive.log<\/pre>\n<p>Run the following command to enable Apache modules:<\/p>\n<pre>sudo a2enmod headers\r\nsudo a2enmod evasive\r\nsudo a2enmod security2<\/pre>\n<p>Restart the Apache2 web server :<\/p>\n<pre>sudo service apache2 restart<\/pre>\n<p>Check if mod_security and mod_evasive modules are enabled on your server:<\/p>\n<pre>sudo apachectl -M | grep security2\r\nsecurity2_module (shared)\r\n\r\nsudo apachectl -M | grep evasive\r\nevasive20_module (shared)<\/pre>\n<p>If you have a WordPress based website hosted on your VPS, most likely you&#8217;ll need to disable some mod_security rules. To disable\/exclude certain mod_security rules you can edit your domain&#8217;s virtual host defined in your domain&#8217;s Apache configuration file, for example:<\/p>\n<pre>&lt;VirtualHost *:80&gt;\r\n\u00a0\u00a0 ServerName yourdomain.com\r\n\u00a0\u00a0 ServerAlias www.yourdomain.com\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 DocumentRoot \/var\/www\/html\/wordpress\/\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;Directory \/&gt;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Options +FollowSymLinks\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 AllowOverride FileInfo\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;\/Directory&gt;\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;LocationMatch \"\/wp-admin\/post.php\"&gt;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 SecRuleRemoveById 300016\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;\/LocationMatch&gt;\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;LocationMatch \"\/wp-admin\/nav-menus.php\"&gt;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 SecRuleRemoveById 300016\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;\/LocationMatch&gt;\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;LocationMatch \"(\/wp-admin\/|\/wp-login.php)\"&gt;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 SecRuleRemoveById 950117\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 SecRuleRemoveById 950005\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;\/LocationMatch&gt;\r\n&lt;\/VirtualHost&gt;<\/pre>\n<p>Do not forget to restart Apache web server for the changes to take effect, so run the following command:<\/p>\n<pre>sudo service apache2 restart<\/pre>\n<p>Check the \/var\/log\/apache2\/modsec_audit.log log file to find the rules that are being triggered by mod_security on your web server.<\/p>\n<p>That\u2019s it. You have mod_security and mod_evasive installed on your Ubuntu VPS.<\/p>\n<p>Of course you don\u2019t have to do any of this if you use one of our <a title=\"Linux VPS Hosting\" href=\"https:\/\/www.rosehosting.com\/managed-vps-hosting.html\" target=\"_blank\" rel=\"noopener noreferrer\">Linux VPS Hosting<\/a> services, in which case you can simply ask our expert Linux admins to <strong>install mod_security and mod_evasive<\/strong> for you. They are available 24&#215;7 and will take care of your request immediately.<\/p>\n<p><strong><span style=\"color: #ff0000;\">PS<\/span>.<\/strong> If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Mod_security is an Apache module that helps to protect your website from various attacks such as cross-site scripting, SQL injection &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"How to install mod_security and mod_evasive on an Ubuntu 14.04 VPS\" class=\"read-more button\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-mod_security-and-mod_evasive-on-an-ubuntu-14-04-vps\/#more-16506\" aria-label=\"Read more about How to install mod_security and mod_evasive on an Ubuntu 14.04 VPS\">Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":4695,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1703,1698],"tags":[645,102,566,200],"class_list":["post-16506","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-security","category-ubuntu","tag-harden-and-secure-apache-web-server","tag-mod_evasive","tag-mod_security","tag-ubuntu-vps","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.5 (Yoast SEO v27.5) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to install mod_security and mod_evasive on an Ubuntu 14.04 VPS | RoseHosting<\/title>\n<meta name=\"description\" content=\"How to install mod_security and mod_evasive on an Ubuntu 14.04 VPS | RoseHosting\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-mod_security-and-mod_evasive-on-an-ubuntu-14-04-vps\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to install mod_security and mod_evasive on an Ubuntu 14.04 VPS\" \/>\n<meta property=\"og:description\" content=\"How to install mod_security and mod_evasive on an Ubuntu 14.04 VPS | RoseHosting\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-mod_security-and-mod_evasive-on-an-ubuntu-14-04-vps\/\" \/>\n<meta property=\"og:site_name\" content=\"RoseHosting\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RoseHosting\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/rosehosting.helpdesk\" \/>\n<meta property=\"article:published_time\" content=\"2014-12-02T18:47:26+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-06-03T08:46:31+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2014\/09\/mod-security-raise-up-your-apache-webserver-security-and-protect-against-cross-site-scripting-javascript-hacks-and-viruses.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"273\" \/>\n\t<meta property=\"og:image:height\" content=\"101\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jeff Wilson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:site\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeff Wilson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-mod_security-and-mod_evasive-on-an-ubuntu-14-04-vps\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-mod_security-and-mod_evasive-on-an-ubuntu-14-04-vps\\\/\"},\"author\":{\"name\":\"Jeff Wilson\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\"},\"headline\":\"How to install mod_security and mod_evasive on an Ubuntu 14.04 VPS\",\"datePublished\":\"2014-12-02T18:47:26+00:00\",\"dateModified\":\"2022-06-03T08:46:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-mod_security-and-mod_evasive-on-an-ubuntu-14-04-vps\\\/\"},\"wordCount\":519,\"commentCount\":11,\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-mod_security-and-mod_evasive-on-an-ubuntu-14-04-vps\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/09\\\/mod-security-raise-up-your-apache-webserver-security-and-protect-against-cross-site-scripting-javascript-hacks-and-viruses.jpg\",\"keywords\":[\"harden and secure Apache web server\",\"mod_evasive\",\"mod_security\",\"ubuntu vps\"],\"articleSection\":[\"Security\",\"Ubuntu\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-mod_security-and-mod_evasive-on-an-ubuntu-14-04-vps\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-mod_security-and-mod_evasive-on-an-ubuntu-14-04-vps\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-mod_security-and-mod_evasive-on-an-ubuntu-14-04-vps\\\/\",\"name\":\"How to install mod_security and mod_evasive on an Ubuntu 14.04 VPS | RoseHosting\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-mod_security-and-mod_evasive-on-an-ubuntu-14-04-vps\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-mod_security-and-mod_evasive-on-an-ubuntu-14-04-vps\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/09\\\/mod-security-raise-up-your-apache-webserver-security-and-protect-against-cross-site-scripting-javascript-hacks-and-viruses.jpg\",\"datePublished\":\"2014-12-02T18:47:26+00:00\",\"dateModified\":\"2022-06-03T08:46:31+00:00\",\"description\":\"How to install mod_security and mod_evasive on an Ubuntu 14.04 VPS | RoseHosting\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-mod_security-and-mod_evasive-on-an-ubuntu-14-04-vps\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-mod_security-and-mod_evasive-on-an-ubuntu-14-04-vps\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-mod_security-and-mod_evasive-on-an-ubuntu-14-04-vps\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/09\\\/mod-security-raise-up-your-apache-webserver-security-and-protect-against-cross-site-scripting-javascript-hacks-and-viruses.jpg\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/09\\\/mod-security-raise-up-your-apache-webserver-security-and-protect-against-cross-site-scripting-javascript-hacks-and-viruses.jpg\",\"width\":273,\"height\":101,\"caption\":\"mod_security\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-mod_security-and-mod_evasive-on-an-ubuntu-14-04-vps\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to install mod_security and mod_evasive on an Ubuntu 14.04 VPS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"name\":\"RoseHosting.com\",\"description\":\"Premium Linux Tutorials Since 2001\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\",\"name\":\"RoseHosting\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"width\":192,\"height\":192,\"caption\":\"RoseHosting\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/RoseHosting\",\"https:\\\/\\\/x.com\\\/rosehosting\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/rosehosting\\\/\"],\"description\":\"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.\",\"email\":\"info@rosehosting.com\",\"telephone\":\"(314) 275-0414\",\"legalName\":\"Rose Web Services LLC\",\"foundingDate\":\"2001-04-02\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"11\",\"maxValue\":\"50\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\",\"name\":\"Jeff Wilson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"caption\":\"Jeff Wilson\"},\"description\":\"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.\",\"sameAs\":[\"https:\\\/\\\/www.rosehosting.com\",\"https:\\\/\\\/www.facebook.com\\\/rosehosting.helpdesk\"],\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/author\\\/jwilson\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to install mod_security and mod_evasive on an Ubuntu 14.04 VPS | RoseHosting","description":"How to install mod_security and mod_evasive on an Ubuntu 14.04 VPS | RoseHosting","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:\/\/www.rosehosting.com\/blog\/how-to-install-mod_security-and-mod_evasive-on-an-ubuntu-14-04-vps\/","og_locale":"en_US","og_type":"article","og_title":"How to install mod_security and mod_evasive on an Ubuntu 14.04 VPS","og_description":"How to install mod_security and mod_evasive on an Ubuntu 14.04 VPS | RoseHosting","og_url":"https:\/\/www.rosehosting.com\/blog\/how-to-install-mod_security-and-mod_evasive-on-an-ubuntu-14-04-vps\/","og_site_name":"RoseHosting","article_publisher":"https:\/\/www.facebook.com\/RoseHosting","article_author":"https:\/\/www.facebook.com\/rosehosting.helpdesk","article_published_time":"2014-12-02T18:47:26+00:00","article_modified_time":"2022-06-03T08:46:31+00:00","og_image":[{"width":273,"height":101,"url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2014\/09\/mod-security-raise-up-your-apache-webserver-security-and-protect-against-cross-site-scripting-javascript-hacks-and-viruses.jpg","type":"image\/jpeg"}],"author":"Jeff Wilson","twitter_card":"summary_large_image","twitter_creator":"@rosehosting","twitter_site":"@rosehosting","twitter_misc":{"Written by":"Jeff Wilson","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-mod_security-and-mod_evasive-on-an-ubuntu-14-04-vps\/#article","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-mod_security-and-mod_evasive-on-an-ubuntu-14-04-vps\/"},"author":{"name":"Jeff Wilson","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713"},"headline":"How to install mod_security and mod_evasive on an Ubuntu 14.04 VPS","datePublished":"2014-12-02T18:47:26+00:00","dateModified":"2022-06-03T08:46:31+00:00","mainEntityOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-mod_security-and-mod_evasive-on-an-ubuntu-14-04-vps\/"},"wordCount":519,"commentCount":11,"publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-mod_security-and-mod_evasive-on-an-ubuntu-14-04-vps\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2014\/09\/mod-security-raise-up-your-apache-webserver-security-and-protect-against-cross-site-scripting-javascript-hacks-and-viruses.jpg","keywords":["harden and secure Apache web server","mod_evasive","mod_security","ubuntu vps"],"articleSection":["Security","Ubuntu"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.rosehosting.com\/blog\/how-to-install-mod_security-and-mod_evasive-on-an-ubuntu-14-04-vps\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-mod_security-and-mod_evasive-on-an-ubuntu-14-04-vps\/","url":"https:\/\/www.rosehosting.com\/blog\/how-to-install-mod_security-and-mod_evasive-on-an-ubuntu-14-04-vps\/","name":"How to install mod_security and mod_evasive on an Ubuntu 14.04 VPS | RoseHosting","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-mod_security-and-mod_evasive-on-an-ubuntu-14-04-vps\/#primaryimage"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-mod_security-and-mod_evasive-on-an-ubuntu-14-04-vps\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2014\/09\/mod-security-raise-up-your-apache-webserver-security-and-protect-against-cross-site-scripting-javascript-hacks-and-viruses.jpg","datePublished":"2014-12-02T18:47:26+00:00","dateModified":"2022-06-03T08:46:31+00:00","description":"How to install mod_security and mod_evasive on an Ubuntu 14.04 VPS | RoseHosting","breadcrumb":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-mod_security-and-mod_evasive-on-an-ubuntu-14-04-vps\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.rosehosting.com\/blog\/how-to-install-mod_security-and-mod_evasive-on-an-ubuntu-14-04-vps\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-mod_security-and-mod_evasive-on-an-ubuntu-14-04-vps\/#primaryimage","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2014\/09\/mod-security-raise-up-your-apache-webserver-security-and-protect-against-cross-site-scripting-javascript-hacks-and-viruses.jpg","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2014\/09\/mod-security-raise-up-your-apache-webserver-security-and-protect-against-cross-site-scripting-javascript-hacks-and-viruses.jpg","width":273,"height":101,"caption":"mod_security"},{"@type":"BreadcrumbList","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-mod_security-and-mod_evasive-on-an-ubuntu-14-04-vps\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.rosehosting.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to install mod_security and mod_evasive on an Ubuntu 14.04 VPS"}]},{"@type":"WebSite","@id":"https:\/\/www.rosehosting.com\/blog\/#website","url":"https:\/\/www.rosehosting.com\/blog\/","name":"RoseHosting.com","description":"Premium Linux Tutorials Since 2001","publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.rosehosting.com\/blog\/#organization","name":"RoseHosting","url":"https:\/\/www.rosehosting.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","width":192,"height":192,"caption":"RoseHosting"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/RoseHosting","https:\/\/x.com\/rosehosting","https:\/\/www.linkedin.com\/in\/rosehosting\/"],"description":"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.","email":"info@rosehosting.com","telephone":"(314) 275-0414","legalName":"Rose Web Services LLC","foundingDate":"2001-04-02","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"11","maxValue":"50"}},{"@type":"Person","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713","name":"Jeff Wilson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","caption":"Jeff Wilson"},"description":"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.","sameAs":["https:\/\/www.rosehosting.com","https:\/\/www.facebook.com\/rosehosting.helpdesk"],"url":"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/"}]}},"_links":{"self":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/16506","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/comments?post=16506"}],"version-history":[{"count":1,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/16506\/revisions"}],"predecessor-version":[{"id":42164,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/16506\/revisions\/42164"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media\/4695"}],"wp:attachment":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media?parent=16506"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/categories?post=16506"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/tags?post=16506"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}