If it helps any,
I found Easyapache right now with ASL 3.2 doesn't actually install mod_security at all. I always have to goto my archived backup of my last apache install and copy over the mod_security.so file.
I also had these errors with mod_sed, because I didn't have mod_sed installed at all. So I just commented that file, but it seems like the ASL post and pre scripts don't do anything from what I can tell during an easyapache build.
Also I'm assuming this is ASL related cause I can't seem to find where this happens, and I have another cPanel server without ASL and this doesn't happen on it. but a file is created here.
/var/cpanel/templates/apache2/main.local
and there is an extra /conf.d/* in there at the top of the file, and that is creating a duel loading of rule sets. I always have to make sure this is commented out and it keeps getting replaced with the "broken" version that has that line in there. This also seems to happen only after an ASL update. or maybe it's generated after ASL -s -f is run not sure really, but I haven't been able to figure out where this file is coming from as deleting it doesn't help. Since it's only a custom template file deleting it is not a big deal, but it re-creates itself somehow, and this file is "custom" so it doesn't come with cPanel normally.
All I know is the primary main.default on a normal cPanel install does not have the /conf.d/* on the top and on my ASL it does. Later down the configuration after the comments there is already a conf.d/* that cPanel generates. So the first one is not needed.
For example the first line, and last line. on normal cPanel install neither conf.d/*.conf are there actually now that I look.
Code:
#Include /etc/httpd/conf.d/*.conf
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Direct modifications to the Apache configuration file may be lost upon subsequent regeneration of the #
# configuration file. To have modifications retained, all modifications must be checked into the #
# configuration system by running: #
# /usr/local/cpanel/bin/apache_conf_distiller --update #
# To see if your changes will be conserved, regenerate the Apache configuration file by running: #
# /usr/local/cpanel/bin/build_apache_conf #
# and check the configuration file for your alterations. If your changes have been ignored, then they will #
# need to be added directly to their respective template files. #
# #
# It is also possible to add custom directives to the various "Include" files loaded by this httpd.conf #
# For detailed instructions on using Include files and the apache_conf_distiller with the new configuration #
# system refer to the documentation at: http://www.cpanel.net/support/docs/ea/ea3/customdirectives.html #
# #
# This configuration file was built from the following templates: #
# /var/cpanel/templates/apache2/main.default #
# /var/cpanel/templates/apache2/main.local #
# /var/cpanel/templates/apache2/vhost.default #
# /var/cpanel/templates/apache2/vhost.local #
# /var/cpanel/templates/apache2/ssl_vhost.default #
# /var/cpanel/templates/apache2/ssl_vhost.local #
# #
# Templates with the '.local' extension will be preferred over templates with the '.default' extension. #
# The only template updated by the apache_conf_distiller is main.default. #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
Include "/usr/local/apache/conf/includes/pre_main_global.conf"
Include "/usr/local/apache/conf/includes/pre_main_2.conf"
LoadModule qos_module modules/mod_qos.so
LoadModule bw_module modules/mod_bw.so
LoadModule bwlimited_module modules/mod_bwlimited.so
LoadModule fastinclude_module modules/mod_fastinclude.so
Include /etc/httpd/conf.d/*.conf
So I'm not sure why I have two of them. The only reason I choose to comment on the first one and not the last one, is I can't seem to find where it's getting put in. I have code in that location in the main.local file.
[% FOREACH dir IN main.include.items -%]
Include [% dir.include %]
[% END -%]
if I remove that code it removes 4 lines of include statements including the *.conf so the other 3 are needed.
for example this is starting from the last line from the above.
Code:
Include /etc/httpd/conf.d/*.conf
Include "/usr/local/apache/conf/mod_bandwidth.conf"
Include "/usr/local/apache/conf/php.conf"
Include "/usr/local/apache/conf/includes/errordocument.conf"
So that foreach loop is getting those 4 lines from somewhere just not sure where.