Change PHP Version EasyApache 3.24.7 Issue

vincentg

Well-Known Member
May 12, 2004
177
5
168
new york
When trying to run it in order to change the current PHP version I get an error
Code:
Distilled successfully
!! Executing custom hook '/usr/local/cpanel/scripts/preeasyapache' !!

Backing up COMODO WAF mod_security configuration
cp: cannot stat `/etc/apache2/conf.d/modsec2.conf': No such file or directory
!! Done executing '/usr/local/cpanel/scripts/preeasyapache' !!

!! '/usr/local/cpanel/scripts/preeasyapache 3.34.7 9999 ' failed with exit code '256' !!
No log entry is created on this error.
 
Last edited by a moderator:

JacobPerkins

Well-Known Member
May 2, 2014
617
97
103
cPanel Access Level
DataCenter Provider
Twitter
Hi,

Have you attempted to migrate these systems to EA4? It appears that EA3 is attempting to stat a directory in '/etc/apache2', but that directory is only valid on EA4.

Could you see if '/etc/cpanel/ea4/paths.conf' exists? If it does, can you run the following?
Code:
rpm -qf /etc/cpanel/ea4/paths.conf
Thanks!
 

vincentg

Well-Known Member
May 12, 2004
177
5
168
new york
I made a mistake in the title - It should be EasyApache 3.34.7

If that is so then wouldn't it just be simple to just copy the rules to the path /etc/apache2/conf.d/modsec2.conf

The rules for cwaf is in /var/cpanel/cwaf/tmp/rules/

Also there has been no problem with EasyApache with any prior version and CWAF
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello @vincentg,

The path and directory structure is reorganized in EasyApache 4, so you can't copy the rules to the EA4 path. Here's a document that explains the path differences:

Introduction to EasyApache 4 - EasyApache 4 - cPanel Documentation

As a workaround, you could temporarily create the following directory structure and file if you simply wanted the EasyApache build to complete:

Code:
/etc/apache2/conf.d/modsec2.conf
However, you would have to remove it after EasyApache completes. The other option is to upgrade to EasyApache 4:

How to Install or Uninstall EasyApache 4 - EasyApache 4 - cPanel Documentation

I also encourage you to report the issue to the Comodo CWAF plugin support forums at:

Free Modsecurity rules - Comodo Web Application Firewall

Thank you.