How to Install ModSecurity on cPanel using Command Line

April 1, 2023 / How-to Guide

This guide explains how to install ModSecurity on cPanel using command line.

To install ModSecurity on cPanel using the command line, follow these steps:

  1. Connect to your server via SSH as the root user.
  2. Install the ModSecurity Apache module by running the following command:
    yum install ea4-experimental
  3. The connection that enables ModSecurity to communicate with a web server will then be installed. We offer two connectors, one each for NGINX and Apache.
  4. These can be set up in WHM or the shell,using:
    1. ModSecurity 2, Run the following command:
      yum remove ea-apache24-mod_security2
    2. Install the significant connector using any one connector:
      1. yum install ea-modsec30-connector-apache24
      2. yum install ea-modsec30-connector-nginx

This way you can install ModSecurity on cPanel using command line. If you have any queries, do not hesitate to contact us. In any manner we can, we are here to assist you.

Spread the love