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.
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 section, the module is not installed.