mod_security error in WHM "HTTP error 401 cgi/addon_modsec.cgi "WHM is configured to disallow execution of unregistered applications when logged in as root or a reseller with the "all" ACL."

HTTP error 401
cgi/addon_modsec.cgi

"WHM is configured to disallow execution of unregistered applications when logged in as root or a reseller with the "all" ACL.
This is a  error that we see when we click on the mod_security in WHM,

To fix this error we need to register the Plug-in and it can be done by the following steps:

 Check for the folder "/var/cpanel/apps" in the cPanel server,
cd /var/cpanel/apps

if not then create a new one

mkdir /var/cpanel/apps

Create a configuration (.conf) file for your plugin. For mod security,for that run the following command.

vi addon_modsec.conf
 
And put the following coding to the .conf file and save the file.

# name
name=addon_modsec

# Service that will serve this app
service=whostmgr

# Physical path: /usr/local/cpanel/3rdparty/Foo.php
# Literal URL path: $server:$port/$cpsession/3rdparty/Foo.php
url=/cgi/addon_modsec.cgi

# System user to run process as
user=root

# Required acls
acls=any

# Display name as show in the service ui
displayname=addon_modsec

After that register mod security plugin for that run the following command
/usr/local/cpanel/bin/register_appconfig  addon_modsec.conf

now Check the mod-security in whm  you will not see the error.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to take a full backup of an account.

We can take the backup via SSH if you have root access to the server and perform the following...

How to restore a full backup of an account

You can restore the backup via SSH if you have root access to the server  Move the...

How to install Cpanel?

To install cpanel you need is a  supported linux distribution with root access. Run the...

How to install and uninstall CSF firewall?

CSF is the firewall for linux servers.For installing CSF run the following commandswget...

To create a package in Whm...

A package is collection of predefined specifications which define what a user or domain may have...

Powered by WHMCompleteSolution