How to install mod_security on your WHM/cPanel VPS

How to install mod_security on your WHM/cPanel VPS
In this tutorial we will show you how to install mod_security on your WHM/cPanel VPS.


1. VIA SSH COMMAND LINE

The first way to install the “mod_security” module on your WHM/cPanel VPS is using the SSH command line. To start with the upgrade you will need to log in to your VPS as ROOT via SSH.


Once you are in the first thing you need to do is to downloads the package lists from the repositories and “update” them to get information on the newest versions of packages and their dependencies. This step is not necessary but it is always a good practice to be done. To do that just type:

yum update

Once the update is done type:

/scripts/easyapache

The following screen will appear:

How to install mod_security on your WHM/cPanel VPSLeave the “DEFAULT” option checked and with your TAB key (located on your keyboard) navigate to the “Customize Profile” button and press ENTER.


On the next screen if you do not want to do any other upgrades just leave the Apache version as it is, and with your TAB key (located on your keyboard) navigate to the “Next Step” button and press ENTER again:

How to install mod_security on your WHM/cPanel VPS


On the next screen if you do not want to do any other upgrades just leave the PHP version as it is, and with your TAB key (located on your keyboard) navigate to the “Next Step” button and press ENTER again:

How to install mod_security on your WHM/cPanel VPS


… and finally on this screen from the list select/check the “Mod Security 2.8.0” field and with your TAB key (located on your keyboard) navigate to the “Save and Build” button and press ENTER.
How to install mod_security on your WHM/cPanel VPS

 

Now sit and relax and wait for the recompilation to finis, and that’s it.


In a mean time, once you select/check the “Mod Security 2.8.0” field the following screen may appear:

How to install mod_security on your WHM/cPanel VPS
..so just click “OK” and the installation will continue.


2. THE GRAPHICAL (WEB BASED) WAY

The second way to install the “mod_security” module on your WHM/cPanel VPS is using your web browser. To start with the upgrade first you will need to log in to your WHM/cPanel control panel interface using your web browser. To do that start your web browser and enter the WHM/cPanel URL, in most cases that should be: “https://your_VPS_IP_address:2087
(do not forget to replace “your_VPS_IP_address” with the actual IP address of your virtual server).

Once you are in, in the “Search” field located at the top left corner type:

easyapache

and click on the “EasyApache (Apache Update)” link:

How to install mod_security on your WHM/cPanel VPS

Once you click on the link a new screen will appear on your screen right side:

How to install mod_security on your WHM/cPanel VPS

Here, under the “Previously Saved Config” section click on the “gear-wheel” icon located under “Actions

How to install mod_security on your WHM/cPanel VPS

and on the next screen if you do not want to do any other upgrade click on the “Next Step” button:

How to install mod_security on your WHM/cPanel VPS

on the next screen if you do not want to do any other upgrade click on the “Next Step” button again:

How to install mod_security on your WHM/cPanel VPS

… and here make sure to check the “Mod Security 2.8.0” check box. Once it is checked click on the “Save and Built” button:

How to install mod_security on your WHM/cPanel VPS

if the following message pop up:

How to install mod_security on your WHM/cPanel VPS… just click “OK”  and after that click on the “Save and Built” button again.


If you’re one of our Linux VPS Hosting customers we can help you and install mod_security on your WHM/cPanel VPS on your virtual server for you free of charge. Just contact us and some of our experts will complete your request immediately.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>