Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Mod_security error in WHM, Error "WHM is configured to disallow execution of "  (Read 5191 times)

0 Members and 1 Guest are viewing this topic.

sumesh

  • Guest
Hi All,

This is a common error we see when we click on the mod_security in WHM,

Error :

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."



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

Check for the folder "/var/cpanel/apps" in the cPanel server, if not then create a new one

mkdir /var/cpanel/apps
chmod 755 /var/cpanel/apps


Create a configuration (.conf) file for your plugin. For mod security,

vi addon_modsec.conf

# 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



Then register mod security plugin

/usr/local/cpanel/bin/register_appconfig  addon_modsec.conf

Thats all, the error will disappear :) :) :)

In order to unregister, use this command

/usr/local/cpanel/bin/unregister_appconfig  addon_modsec.conf

/usr/local/cpanel/bin/show_appconfig — This script displays a YAML-formatted list of applications that are registered with AppConfig and their settings.


Check the above and fix the error...

Thank you  :)