SecAuditLogFormat is not recognized by apache httpd after upgrading directadmin components

Description

You get the following error when trying to upgrade directadmin components on CentOS 6:
Restarting apache.
Stopping httpd: AH00526: Syntax error on line 12 of /etc/httpd/conf/extra/httpd-modsecurity.conf:
Invalid command 'SecAuditLogFormat', perhaps misspelled or defined by a module not included in the server configuration

Starting httpd: AH00526: Syntax error on line 12 of /etc/httpd/conf/extra/httpd-modsecurity.conf:
Invalid command 'SecAuditLogFormat', perhaps misspelled or defined by a module not included in the server configuration
[FAILED]


Solution

1. Make sure your yum is working correctly, if not because CentOS 6 reached its EOL.. try to run:
cat <<-'EOF' > /etc/yum.repos.d/CentOS-Base.repo
[C6.10-base]
name=CentOS-6.10 - Base
baseurl=http://vault.centos.org/6.10/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=1
metadata_expire=never

[C6.10-updates]
name=CentOS-6.10 - Updates
baseurl=http://vault.centos.org/6.10/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=1
metadata_expire=never

[C6.10-extras]
name=CentOS-6.10 - Extras
baseurl=http://vault.centos.org/6.10/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=1
metadata_expire=never

[C6.10-contrib]
name=CentOS-6.10 - Contrib
baseurl=http://vault.centos.org/6.10/contrib/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=0
metadata_expire=never

[C6.10-centosplus]
name=CentOS-6.10 - CentOSPlus
baseurl=http://vault.centos.org/6.10/centosplus/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=0
metadata_expire=never
EOF

(Source: https://www.getpagespeed.com/server-setup/how-to-fix-yum-after-centos-6-went-eol)

2. Clear yum cache: yum clean all

3. Run the following commands to rebuild modsecurity:
cd /usr/local/directadmin/custombuild
./build update
./build modsecurity

Affected software:

CentOS 6.x
Linux 2.6.x






Add new comment
Name:
Anti-Bots verification code (just write 1234):