Installing modsecurity Error

prakashnplink

Active Member
Apr 8, 2014
35
1
8
cPanel Access Level
Root Administrator
I was trying to install modsecurity OWASP rules but got following error, anybody any idea?

Error:The system experienced the following error when it attempted to install the “OWASP ModSecurity Core Rule Set” vendor: API failure: The vendor metadata does not contain an entry for your version of ModSecurity, “2.7.7”. The only versions of ModSecurity this rule set supports are “2.8.0” and “2.9.0”.

Of course it means what it says, I must have 2.7.7 modsecurity version but when I checked from WHM easyapache it is already in 2.9. How to remove modsecurity completely and reinstall it? I have already tried from easyapache but was not helpful.
 

quizknows

Well-Known Member
Oct 20, 2009
1,008
87
78
cPanel Access Level
DataCenter Provider
You should just need to run an easyapache with your current apache and php versions intact. That will upgrade modsecurity when it runs.

When new ModSecurity versions are available in EA, you don't get the new version unless you re-run EA. In other words, just because EA builds modsec 2.9 now doesn't mean you're running that version unless you've recently ran a build.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,254
463
Hello :)

Yes, as mentioned, it's likely because you have not run EasyApache recently. Ensure you proceed with the actual Apache build when utilizing the EasyApache option.

Thank you.
 

prakashnplink

Active Member
Apr 8, 2014
35
1
8
cPanel Access Level
Root Administrator
yes ofcourse easyapache was run and apache is rebuild again but again same problem. There is two options to build apache: apache 2.2 and 2.4, our apache is 2.2. The thing is that even it is not upgraded to minor version like from 2.2.26 to 2.2.29 or 2.2.31. How to upgrade minor version of apache when there is only two option 2.2 and 2.4? :(
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,254
463
How to upgrade minor version of apache when there is only two option 2.2 and 2.4?
The most recent minor version available with EasyApache is automatically utilized. Have you verified that EasyApache completes successfully and there are no build failures?

Thank you.
 

quizknows

Well-Known Member
Oct 20, 2009
1,008
87
78
cPanel Access Level
DataCenter Provider
You can run "/scripts/easyapache --latest-versions" to see what the latest minor versions are that will be built:

Code:
[[email protected] ~]# /scripts/easyapache --latest-versions
!! Object fetch succeeded with {"status":"1"} for EasyApache v3305 and Cpanel v1150 !!
Easy Apache v3.30.5

[Apache]
   2.2.31, 2.4.16

[PHP 5]
   5.3.29, 5.4.44, 5.5.28, 5.6.12
 

prakashnplink

Active Member
Apr 8, 2014
35
1
8
cPanel Access Level
Root Administrator
Okay looks like there is an error while rebuilding Apache. Because of this error, easyapache roll back to previous state and apache was never updated.

ERROR:

Configuration problem detected on line 28 of file /usr/local/apache/conf/httpd.conf.1440180446: : Syntax error on line 2 of /usr/local/apache/conf/includes/pre_main_global.conf: Cannot load /usr/local/apache/modules/mod_rpaf-2.0.so into server: /usr/local/apache/modules/mod_rpaf-2.0.so: cannot open shared object file: No such file or directory

I think the module mod_rpaf-2.0.so is manually installed. To fix it I have to do following:

[1] Remove the LoadModule line for the custom unsupported mod_rpaf-2.0 module from Apache includes
[2] Run EasyApache as desired
[3] Manually re-install the custom unsupported mod_rpaf-2.0 module again and put its LoadModule line back

Thank you for replies. :)
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,254
463