libapache2-mod-security2 broken configuration

Bug #1775167 reported by Josef Meile
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
modsecurity-apache (Ubuntu)
New
Undecided
Unassigned

Bug Description

Dear sirs

I'm trying to install libapache2-mod-security2 (2.9.2-4502xenial) as follows:

apt-get install libapache2-mod-security2

but I'm getting this error message:

apache2_reload: Your configuration is broken. Not restarting Apache 2
apache2_reload: apache2: Syntax error on line 144 of /etc/apache2/apache2.conf: Syntax error on line 12 of /etc/apache2/mods-enabled/security2.conf: Could not open configuration file /usr/share/modsecurity-crs/owasp-crs.load: No such file or directory

Indeed the file:
/usr/share/modsecurity-crs/owasp-crs.load

does not exist. Here line 144 of /etc/apache2/apache2.conf:
IncludeOptional mods-enabled/*.conf

Then line 12 of /etc/apache2/mods-enabled/security2.conf:
IncludeOptional /usr/share/modsecurity-crs/owasp-crs.load

So, it is trying to include an nonexistent file and that's why apache fails to start. Removing libapache2-mod-security2 solves the issue.

I'm having this issue in three servers using: "Ubuntu 16.04.4 LTS", so, it must be something wrong with the package.

Thanks in advanced
Josef Meile

Revision history for this message
Josef Meile (jmeile) wrote :

I just found this:
https://github.com/oerdnj/deb.sury.org/issues/714

One comment of jaydrogers suggest to do this:

wget http://mirrors.kernel.org/ubuntu/pool/universe/m/modsecurity-crs/modsecurity-crs_3.0.0-3_all.deb
sudo dpkg -i modsecurity-crs_3.0.0-3_all.deb

It actually fixes the issue, but I guess this should be fixed in the official package.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.