Search Our Database

How to check mod_security is On or Off

Last updated on |
by

Step 1 – Login to your web server via SSH.

 

Step 2 – Create a phpinfo.php in your public_html directory. Type the following command on your terminal.

vi /var/www/public_html/phpinfo.php

 

Step 3 – Type and save the command below into the newly created file.

<php? 
 
phpinfo();
 
?>

 

Step 4 – You can view the file by typing http://yourdomain/phpinfo.php in your browser’s address bar. Once loaded, search for mod_security2 and if you can’t find such a section, the module is not installed.