HEX
Server: Apache/2
System: Linux nexus-01 4.18.0-553.120.1.el8_10.x86_64 #1 SMP Mon Apr 20 18:04:27 EDT 2026 x86_64
User: aglcoke (1118)
PHP: 8.2.31
Disabled: mail,exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/cwaf/vars.sh
export CWAF_VERSION='2.24.5'
export CWAF_BUILD='29'
 
export CWAF_LOGIN=''
export CWAF_PASSWORD=''
export CWAF_INSTALL_PATH=''
export CWAF_MAIN_CONF="etc/main.conf"
export CWAF_USER_CONF="etc/httpd/custom_user.conf"
export CWAF_GUI_CONF="etc/standalone-gui.conf"
export CWAF_MAIN_CONF_SKEL="etc/main.conf-skel"
export CWAF_WRAPPER_BIN='scripts/cwaf-wrapper.pl'
export CWAF_SUDOERS_PATH='/etc/sudoers.d'
export CWAF_SUDOERS_FILE="$CWAF_SUDOERS_PATH/cwaf"

export INSTALL_LOGFILE="/tmp/cwaf_install.log.$$"

export CWAF_CPANEL_PATH='/var/cpanel/cwaf'
export CWAF_PLESK_PATH='/usr/local/cwaf'
export CWAF_WEBMIN_PATH='/usr/local/cwaf'
export CWAF_DA_PATH='/usr/local/cwaf'
export CWAF_STANDALONE_PATH='/usr/local'
export CWAF_LOG_DIR='/var/log/CWAF'
export CWAF_ETC_DIR='/etc/cwaf'

export APACHE_SUPPORTED_VERSIONS="2.2.* 2.4.*"
export MODSEC_SUPPORTED_VERSIONS="2.7.5 2.7.7 2.8.0 2.9.0 2.9.1 2.9.2 2.9.3"
export APACHE_LOG_DIR='/var/log/httpd'

export CPANEL_LOWER_VERSION="11.38"
export CPANEL_BIN='/usr/local/cpanel/cpanel'
export CPANEL_APPCONFIG_PATH='/var/cpanel/apps'
export CPANEL_APPCONFIG='/usr/local/cpanel/bin/register_appconfig'
export CPANEL_APACHE_CONFDIR="/usr/local/apache/conf"
export CPANEL_APACHE_CONF="$CPANEL_APACHE_CONFDIR/httpd.conf"
export CPANEL_MODSECFILE="modsec2.conf"
export CPANEL_MODSECCONF="$CPANEL_APACHE_CONFDIR/$CPANEL_MODSECFILE"
export CPANEL_MODSECSRC="etc/modsec2_cpanel.conf"
export CPANEL_CWAFBACKUP_MODSECCONF="$CPANEL_APACHE_CONFDIR/$CPANEL_MODSECFILE.cwaf_orig"
export CPANEL_APACHECTL="/usr/local/apache/bin/apachectl"
export CPANEL_PERL="/usr/local/cpanel/3rdparty/bin/perl"
export CPANEL_CPAN="/usr/local/cpanel/3rdparty/perl/514/bin/cpan"
export CPANEL_CWAF_CGIDIR="/usr/local/cpanel/whostmgr/docroot/cgi"

# AE4 have different paths
if [ -e "/etc/cpanel/ea4/is_ea4" ]; then
  export CPANEL_APACHE_CONFDIR="/etc/apache2/conf.d"
  export CPANEL_MODSECFILE="zzzz_cwaf_security2.conf"
  export CPANEL_MODSECCONF="$CPANEL_APACHE_CONFDIR/$CPANEL_MODSECFILE"
  export CPANEL_MODSECSRC="etc/modsec2_cpanel_ea4.conf"
  export CPANEL_CWAFBACKUP_MODSECCONF="$CPANEL_APACHE_CONFDIR/$CPANEL_MODSECFILE.cwaf_orig"
fi

export PLESK_CONF='/etc/psa/psa.conf'
export PLESK_HTTPD_CONF_REQUIRED='PRODUCT_ROOT_D HTTPD_CONF_D HTTPD_INCLUDE_D HTTPD_LOG_D'
export PLESK_PRODUCT_ROOT_D='/usr/local/psa'
export PLESK_HTTPD_CONF_D='/etc/httpd/conf'
export PLESK_HTTPD_INCLUDE_D='/etc/httpd/conf.d'
export PLESK_MODSECFILE='zzzz_cwaf_security2.conf'
export PLESK_LOWER_VERSION="10.0"
export PLESK_BIN="/usr/sbin/plesk"
export PLESK_USER="psaadm"

export WEBMIN_CONF='/etc/webmin/miniserv.conf'
export WEBMIN_ROOT='/usr/libexec/webmin'
export WEBMIN_BIN="$WEBMIN_ROOT/miniserv.pl"
export WEBMIN_APACHE_CONFDIR='/etc/httpd/conf.d'
export WEBMIN_MODSECFILE='zzzz_cwaf_security2.conf'
export WEBMIN_MODSECCONF="$WEBMIN_APACHE_CONFDIR/$WEBMIN_MODSECFILE"

export DA_PATH='/usr/local/directadmin'
export DA_PLUGIN_DIR="$DA_PATH/plugins/comodo_waf"
export DA_BIN="$DA_PATH/directadmin"
export DA_USER="cwaf_plugin"
export DA_APACHE_MSCONF="/etc/httpd/conf/extra/httpd-modsecurity.conf"
export DA_NGINX_MSCONF="/etc/nginx/nginx-modsecurity.conf"
export DA_OPENLS_MSCONF="/usr/local/lsws/conf/httpd-modsecurity.conf"
export DA_PLUGIN_MSCONF="conf/modsec2_plugin.conf"

export STANDALONE_GUI_IP='127.0.0.1'
export STANDALONE_GUI_PORT='5580'
export STANDALONE_USER='nobody'
export STANDALONE_MSCONF="etc/modsec2_standalone.conf"

export FIRSTRUN_FILE='etc/first.run'

# Note: plesk require IO::Socket::SSL instead of Crypt::SSLeay
export PERL_REQUIRED_MODULES="Exporter Time::Local LWP JSON HTTP::Request HTTP::Cookies LWP::Protocol::https CGI Digest::MD5 POSIX YAML::Syck MIME::Base64 Template"
export PERL_REQUIRED_MODULES_CPANEL="Crypt::SSLeay"
export PERL_REQUIRED_MODULES_PLESK="IO::Socket::SSL"
export PERL_REQUIRED_MODULES_WEBMIN=""
export PERL_REQUIRED_MODULES_DIRECTADMIN=""
export PERL_REQUIRED_MODULES_STANDALONE="HTTP::Daemon HTTP::Status HTTP::Date"

export PATH="/bin:/usr/bin:/usr/local/bin:/usr/sbin:/usr/local/sbin:/usr/local/apache/bin:/usr/local/apache/sbin:$PATH"
export PERL_BIN="/usr/bin/perl"
export CPAN_BIN=`which cpan 2>/dev/null`
export APACHECTL_BIN=`which apachectl 2>/dev/null`
export APACHE2CTL_BIN=`which apache2ctl 2>/dev/null`
export BASE64_BIN=`which base64 2>/dev/null`
export LITESPEED_BIN="/usr/local/lsws/bin/lshttpd"
export NGINX_BIN="/usr/local/nginx/sbin/nginx"

export SUBST_FILES='web/cpanel/*.cgi etc/*.conf etc/main.conf-skel scripts/*.* etc/version.dat modules/CPAN/lib/Comodo/CWAF/Main.pm web/plesk/plugin/plib/modules/cwaf/meta.xml web/directadmin/plugin.conf web/directadmin/hooks/*.html'

export CPANEL_BACKUP_FILES='etc/main.conf etc/httpd/global/ etc/httpd/domains/'
export PLESK_BACKUP_FILES='etc/main.conf etc/httpd/global/ etc/httpd/domains/'
export STANDALONE_BACKUP_FILES='etc/main.conf etc/httpd/global/ etc/httpd/domains/'

export CWAF_MODSEC_PARAMS='SecRuleEngine SecAuditEngine SecAuditLog SecDebugLog SecDebugLogLevel SecRequestBodyAccess SecDataDir SecTmpDir SecPcreMatchLimit SecPcreMatchLimitRecursion'

## TAKE CONFIG PARAMS ##