CIS Apache HTTP Server 2.4 Benchmark

Secure configuration guidelines for the Apache HTTP Server

v2.2.0 September 2024

Overview

▶

This CIS Benchmark provides prescriptive guidance for establishing a secure configuration posture for the Apache HTTP Server 2.4. Recommendations cover installation hardening, module minimization, TLS, access control, logging, and denial-of-service mitigation.

~100Recommendations
8Sections
2Profile Levels
SectionAreaFocus
1Planning & InstallationPre-install planning, patching
2Minimize ModulesDisable unnecessary modules
3Permissions & OwnershipApache user, directory perms
4Logging & MonitoringAccess/error logs, ModSecurity
5Access ControlDirectory access, authentication
6SSL/TLSProtocols, ciphers, HSTS
7Information DisclosureServerTokens, ServerSignature
8DoS MitigationsTimeouts, request limits

Profile Definitions

▶
ProfileDescriptionIntended Use
L1Level 1 — Web ServerEssential security settings applicable to all Apache deployments.
L2Level 2 — Web ServerDefense-in-depth. May require module compilation changes or application testing.

1 — Planning & Installation

▶

1.1 Pre-Installation

▶
1.1.1 Ensure the Pre-Installation Planning Checklist Has Been Implemented (Manual)
L2 Manual
Description

Perform a security-focused planning review before any Apache installation addressing network placement, web content source, user access requirements, and module selection.

Rationale

Without a structured pre-installation planning process, Apache HTTP Server deployments may be configured with unnecessary modules, excessive privileges, or improper network placement. A planning checklist ensures security considerations are addressed before the server enters production.

Audit
# Verify that a pre-installation planning document exists and covers:
# - Network placement and firewall rules
# - Required modules and features
# - User access requirements
# - Content source and ownership
# Review organizational documentation for the planning checklist.
Remediation
# Create and complete a pre-installation planning checklist that addresses:
# 1. Network placement — place the Apache server in a DMZ or appropriate network segment
# 2. Module selection — enable only the modules required for the application
# 3. User accounts — define a dedicated non-privileged service account
# 4. Content source — identify and verify the origin of all web content
# 5. Access controls — define who requires administrative access and how it is granted
# Document and retain the completed checklist per organizational policy.
1.1.2 Ensure the Server Is Not a Multi-Use System (Manual)
L1 Manual
Description

This recommendation verifies that the Server Is Not a Multi-Use System on the Apache HTTP Server 2.4 web server. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to the Server Is Not a Multi-Use System may leave the Apache HTTP Server 2.4 web server vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
# Verify only necessary services are running:
ss -tlnp | grep -v httpd
Remediation

Dedicate the system to the Apache web server role. Remove or disable all unnecessary services and applications.

1.2 Installation & Patching

▶
1.2.1 Ensure Apache Is Installed from an Appropriate Source (Manual)
L1 Manual
Description

This recommendation verifies that apache Is Installed from an Appropriate Source on the Apache HTTP Server 2.4 web server. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to apache Is Installed from an Appropriate Source may leave the Apache HTTP Server 2.4 web server vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
httpd -v
rpm -qi httpd 2>/dev/null || dpkg -s apache2 2>/dev/null
Remediation

Install Apache from official OS vendor repositories or compile from the verified Apache HTTP Server source at https://httpd.apache.org.

1.2.2 Ensure the Latest Security Patches Are Applied (Automated)
L1 Auto
Description

This recommendation verifies that the Latest Security Patches Are Applied on the Apache HTTP Server 2.4 web server. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to the Latest Security Patches Are Applied may leave the Apache HTTP Server 2.4 web server vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
httpd -v
# Compare version against https://httpd.apache.org/security/vulnerabilities_24.html
Remediation
dnf update httpd
# or
apt upgrade apache2

2 — Minimize Modules

▶

2.1 Core Modules

▶
2.1.1 Ensure Only Necessary Authentication and Authorization Modules Are Enabled (Manual)
L2 Manual
Description

This setting controls whether Only Necessary Authentication and Authorization Modules is enabled on the Apache HTTP Server 2.4 web server. Enabling this feature strengthens the security posture by enforcing the recommended configuration via httpd.conf, apache2.conf, or site configuration files.

Rationale

Without Only Necessary Authentication and Authorization Modules enabled, the Apache HTTP Server 2.4 web server may lack critical protections against known attack vectors. Enabling this control mitigates risk and aligns the deployment with industry-accepted security baselines.

Audit
httpd -M 2>/dev/null | grep -E 'auth|access'
# or
apache2ctl -M 2>/dev/null | grep -E 'auth|access'
Remediation

Disable unnecessary auth modules by commenting out the LoadModule directive in the httpd.conf or removing the symlink from mods-enabled/.

2.1.2 Ensure the Log Config Module Is Enabled (Automated)
L1 Auto
Description

This setting controls whether the Log Config Module is enabled on the Apache HTTP Server 2.4 web server. Enabling this feature strengthens the security posture by enforcing the recommended configuration via httpd.conf, apache2.conf, or site configuration files.

Rationale

Without the Log Config Module enabled, the Apache HTTP Server 2.4 web server may lack critical protections against known attack vectors. Enabling this control mitigates risk and aligns the deployment with industry-accepted security baselines.

Audit
httpd -M 2>&1 | grep log_config
# Should show: log_config_module (shared)
Remediation
# httpd.conf:
LoadModule log_config_module modules/mod_log_config.so

2.2 Additional Modules

▶
2.2.1 Ensure mod_dav Is Disabled (Automated)
L1 Auto
Description

This setting controls whether mod_dav is disabled on the Apache HTTP Server 2.4 web server. Disabling this feature reduces the attack surface by removing unnecessary functionality that could be exploited by an attacker.

Rationale

Leaving mod_dav enabled when it is not required unnecessarily expands the attack surface. An attacker could leverage this feature to gain unauthorized access or escalate privileges on the Apache HTTP Server 2.4 web server.

Audit
httpd -M 2>&1 | grep dav
# Should return empty
Remediation
# Comment out in httpd.conf:
# LoadModule dav_module modules/mod_dav.so
# LoadModule dav_fs_module modules/mod_dav_fs.so
2.2.2 Ensure mod_status Is Disabled (Automated)
L1 Auto
Description

This setting controls whether mod_status is disabled on the Apache HTTP Server 2.4 web server. Disabling this feature reduces the attack surface by removing unnecessary functionality that could be exploited by an attacker.

Rationale

Leaving mod_status enabled when it is not required unnecessarily expands the attack surface. An attacker could leverage this feature to gain unauthorized access or escalate privileges on the Apache HTTP Server 2.4 web server.

Audit
httpd -M 2>&1 | grep status_module
# Should return empty
Remediation
# Comment out:
# LoadModule status_module modules/mod_status.so
2.2.3 Ensure mod_autoindex Is Disabled (Automated)
L1 Auto
Description

This setting controls whether mod_autoindex is disabled on the Apache HTTP Server 2.4 web server. Disabling this feature reduces the attack surface by removing unnecessary functionality that could be exploited by an attacker.

Rationale

Leaving mod_autoindex enabled when it is not required unnecessarily expands the attack surface. An attacker could leverage this feature to gain unauthorized access or escalate privileges on the Apache HTTP Server 2.4 web server.

Audit
httpd -M 2>&1 | grep autoindex
# Should return empty
Remediation
# Comment out:
# LoadModule autoindex_module modules/mod_autoindex.so
2.2.4 Ensure mod_proxy Is Disabled If Not Required (Manual)
L1 Manual
Description

This setting enforces that mod_proxy Is Disabled If Not is required on the Apache HTTP Server 2.4 web server. Making this mandatory ensures consistent security policy enforcement across the environment.

Rationale

Failure to mod_proxy Is Disabled If Not Required may leave the Apache HTTP Server 2.4 web server vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
httpd -M 2>&1 | grep proxy
Remediation
# If not needed, comment out all proxy modules:
# LoadModule proxy_module modules/mod_proxy.so
# LoadModule proxy_http_module modules/mod_proxy_http.so
2.2.5 Ensure mod_info Is Disabled (Automated)
L1 Auto
Description

This setting controls whether mod_info is disabled on the Apache HTTP Server 2.4 web server. Disabling this feature reduces the attack surface by removing unnecessary functionality that could be exploited by an attacker.

Rationale

Leaving mod_info enabled when it is not required unnecessarily expands the attack surface. An attacker could leverage this feature to gain unauthorized access or escalate privileges on the Apache HTTP Server 2.4 web server.

Audit
httpd -M 2>&1 | grep info_module
# Should return empty
Remediation
# Comment out:
# LoadModule info_module modules/mod_info.so
2.2.6 Ensure mod_userdir Is Disabled (Automated)
L1 Auto
Description

This setting controls whether mod_userdir is disabled on the Apache HTTP Server 2.4 web server. Disabling this feature reduces the attack surface by removing unnecessary functionality that could be exploited by an attacker.

Rationale

Leaving mod_userdir enabled when it is not required unnecessarily expands the attack surface. An attacker could leverage this feature to gain unauthorized access or escalate privileges on the Apache HTTP Server 2.4 web server.

Audit
httpd -M 2>&1 | grep userdir
Remediation
# Comment out:
# LoadModule userdir_module modules/mod_userdir.so

3 — Permissions & Ownership

▶

3.1 Apache User & Group

▶
3.1.1 Ensure Apache Runs as a Non-Root User (Automated)
L1 Auto
Description

This recommendation verifies that apache Runs as a Non-Root User on the Apache HTTP Server 2.4 web server. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to apache Runs as a Non-Root User may leave the Apache HTTP Server 2.4 web server vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
grep -E '^User|^Group' /etc/httpd/conf/httpd.conf
# Should not be root
ps -ef | grep httpd | grep -v grep
Remediation
# httpd.conf:
User apache
Group apache
3.1.2 Ensure the Apache User Account Has an Invalid Shell (Automated)
L1 Auto
Description

This recommendation verifies that the Apache User Account Has an Invalid Shell on the Apache HTTP Server 2.4 web server. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to the Apache User Account Has an Invalid Shell may leave the Apache HTTP Server 2.4 web server vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
grep apache /etc/passwd
# Shell should be /sbin/nologin or /usr/sbin/nologin
Remediation
usermod -s /sbin/nologin apache
3.1.3 Ensure the Apache User Account Is Locked (Automated)
L1 Auto
Description

This recommendation verifies that the Apache User Account Is Locked on the Apache HTTP Server 2.4 web server. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to the Apache User Account Is Locked may leave the Apache HTTP Server 2.4 web server vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
passwd -S apache
# Should show 'L' (locked)
Remediation
passwd -l apache

3.2 Directory Permissions

▶
3.2.1 Ensure Apache Directories Are Owned by Root (Automated)
L1 Auto
Description

The ownership of Apache Directories Are should be set to Root. Correct file and directory ownership prevents unauthorized modification and maintains the integrity of the Apache HTTP Server 2.4 web server configuration.

Rationale

Incorrect ownership of Apache Directories Are may allow unauthorized users to modify critical configuration or executable files. Ensuring correct ownership is essential for maintaining the integrity of the Apache HTTP Server 2.4 web server.

Audit
stat -c '%U:%G' /etc/httpd /etc/httpd/conf /etc/httpd/conf.d
# Should be root:root
Remediation
chown -R root:root /etc/httpd/conf /etc/httpd/conf.d
3.2.2 Ensure the Document Root Directory Has Appropriate Permissions (Automated)
L1 Auto
Description

This recommendation verifies that the Document Root Directory Has Appropriate Permissions on the Apache HTTP Server 2.4 web server. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to the Document Root Directory Has Appropriate Permissions may leave the Apache HTTP Server 2.4 web server vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
stat -c '%a %U:%G' /var/www/html
# Permissions should be 755 or more restrictive
Remediation
chmod 755 /var/www/html
chown root:root /var/www/html
3.2.3 Ensure the Core Dump Directory Is Secured (Automated)
L2 Auto
Description

This recommendation verifies that the Core Dump Directory Is Secured on the Apache HTTP Server 2.4 web server. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to the Core Dump Directory Is Secured may leave the Apache HTTP Server 2.4 web server vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
grep CoreDumpDirectory /etc/httpd/conf/httpd.conf
# Should not be set, or set to a restricted directory
Remediation

Ensure CoreDumpDirectory is not configured, or points to a root-owned directory with 700 permissions.

3.2.4 Ensure Lock File Is Secured (Automated)
L1 Auto
Description

This recommendation verifies that lock File Is Secured on the Apache HTTP Server 2.4 web server. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to lock File Is Secured may leave the Apache HTTP Server 2.4 web server vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
grep LockFile /etc/httpd/conf/httpd.conf
# Default location /run/httpd/ is typically secure
Remediation

Ensure the LockFile (or Mutex directive) stores lock files in a directory writable only by root.

4 — Logging & Monitoring

▶

4.1 Log Configuration

▶
4.1.1 Ensure the Error Log Is Configured (Automated)
L1 Auto
Description

This recommendation addresses the proper configuration of the Error Log on the Apache HTTP Server 2.4 web server. Proper configuration ensures the component operates securely and in accordance with organizational security policies.

Rationale

Misconfiguration of the Error Log can lead to security gaps that may be exploited by attackers. A properly configured Apache HTTP Server 2.4 web server reduces exposure to both known vulnerabilities and configuration drift.

Audit
grep '^ErrorLog' /etc/httpd/conf/httpd.conf
# Should point to a valid log path
Remediation
# httpd.conf:
ErrorLog "logs/error_log"
LogLevel warn
4.1.2 Ensure LogLevel Is Set to at Least 'notice' for Core (Automated)
L1 Auto
Description

This recommendation configures LogLevel to at Least 'notice' for Core on the Apache HTTP Server 2.4 web server. Setting this value appropriately ensures the system operates within the security parameters defined by the CIS benchmark.

Rationale

An improperly configured value for LogLevel could weaken security controls or allow unintended behavior. Setting this to at Least 'notice' for Core ensures the Apache HTTP Server 2.4 web server operates within a well-defined security boundary.

Audit
grep LogLevel /etc/httpd/conf/httpd.conf
Remediation
LogLevel notice core:info
4.1.3 Ensure the Access Log Is Configured (Automated)
L1 Auto
Description

This recommendation addresses the proper configuration of the Access Log on the Apache HTTP Server 2.4 web server. Proper configuration ensures the component operates securely and in accordance with organizational security policies.

Rationale

Misconfiguration of the Access Log can lead to security gaps that may be exploited by attackers. A properly configured Apache HTTP Server 2.4 web server reduces exposure to both known vulnerabilities and configuration drift.

Audit
grep -E '^CustomLog|^TransferLog' /etc/httpd/conf/httpd.conf
Remediation
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
CustomLog "logs/access_log" combined
4.1.4 Ensure Log Files Are Rotated (Automated)
L1 Auto
Description

This recommendation verifies that log Files Are Rotated on the Apache HTTP Server 2.4 web server. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to log Files Are Rotated may leave the Apache HTTP Server 2.4 web server vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
cat /etc/logrotate.d/httpd
Remediation
# /etc/logrotate.d/httpd:
/var/log/httpd/*log {
    daily
    missingok
    rotate 52
    compress
    notifempty
    postrotate
        /bin/systemctl reload httpd.service > /dev/null 2>&1 || true
    endscript
}

4.2 ModSecurity & Monitoring

▶
4.2.1 Ensure mod_security Is Installed and Enabled (Manual)
L2 Manual
Description

This recommendation verifies that mod_security Is Installed and Enabled on the Apache HTTP Server 2.4 web server. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to mod_security Is Installed and Enabled may leave the Apache HTTP Server 2.4 web server vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
httpd -M 2>&1 | grep security
# Should show: security2_module
Remediation
dnf install mod_security mod_security_crs
# or
apt install libapache2-mod-security2

5 — Access Control & Authorization

▶

5.1 Directory & File Access

▶
5.1.1 Ensure the Default Deny Directive Is Set for the OS Root Directory (Automated)
L1 Auto
Description

This recommendation verifies that the Default Deny Directive Is Set for the OS Root Directory on the Apache HTTP Server 2.4 web server. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to the Default Deny Directive Is Set for the OS Root Directory may leave the Apache HTTP Server 2.4 web server vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
grep -A4 '<Directory />' /etc/httpd/conf/httpd.conf
Remediation
<Directory />
    AllowOverride None
    Require all denied
</Directory>
5.1.2 Ensure Options for the OS Root Directory Are Restricted (Automated)
L1 Auto
Description

This setting ensures that Options for the OS Root Directory is restricted on the Apache HTTP Server 2.4 web server. Restricting this capability limits potential abuse and enforces the principle of least privilege across the environment.

Rationale

Unrestricted Options for the OS Root Directory could allow unauthorized users or processes to perform actions beyond their intended scope. Applying least-privilege principles to the Apache HTTP Server 2.4 web server is essential for defense in depth.

Audit
grep -A5 '<Directory />' /etc/httpd/conf/httpd.conf | grep Options
Remediation
<Directory />
    Options None
    AllowOverride None
    Require all denied
</Directory>
5.1.3 Ensure FollowSymLinks Is Disabled (Automated)
L1 Auto
Description

This setting controls whether FollowSymLinks is disabled on the Apache HTTP Server 2.4 web server. Disabling this feature reduces the attack surface by removing unnecessary functionality that could be exploited by an attacker.

Rationale

Leaving FollowSymLinks enabled when it is not required unnecessarily expands the attack surface. An attacker could leverage this feature to gain unauthorized access or escalate privileges on the Apache HTTP Server 2.4 web server.

Audit
grep -r 'Options.*FollowSymLinks' /etc/httpd/
# Should not appear without SymLinksIfOwnerMatch
Remediation
# Replace FollowSymLinks with SymLinksIfOwnerMatch in all Options directives:
Options -FollowSymLinks +SymLinksIfOwnerMatch
5.1.4 Ensure AllowOverride Is Set to None for Root (Automated)
L1 Auto
Description

This recommendation configures AllowOverride to None for Root on the Apache HTTP Server 2.4 web server. Setting this value appropriately ensures the system operates within the security parameters defined by the CIS benchmark.

Rationale

An improperly configured value for AllowOverride could weaken security controls or allow unintended behavior. Setting this to None for Root ensures the Apache HTTP Server 2.4 web server operates within a well-defined security boundary.

Audit
grep -r 'AllowOverride' /etc/httpd/conf/httpd.conf
Remediation
# For OS root and Apache root:
AllowOverride None

5.2 Authentication

▶
5.2.1 Ensure .htaccess Files Are Restricted If Used (Manual)
L2 Manual
Description

This recommendation verifies that .htaccess Files Are Restricted If Used on the Apache HTTP Server 2.4 web server. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to .htaccess Files Are Restricted If Used may leave the Apache HTTP Server 2.4 web server vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
find /var/www -name '.htaccess' -exec ls -la {} \;
grep -r 'AccessFileName' /etc/httpd/conf/httpd.conf
Remediation

When AllowOverride is None, .htaccess files are ignored. If required, restrict AllowOverride to only the directives needed.

6 — SSL/TLS Configuration

▶

6.1 Protocol & Ciphers

▶
6.1.1 Ensure mod_ssl or mod_nss Is Installed (Automated)
L1 Auto
Description

This recommendation verifies that mod_ssl or mod_nss Is Installed on the Apache HTTP Server 2.4 web server. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to mod_ssl or mod_nss Is Installed may leave the Apache HTTP Server 2.4 web server vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
httpd -M 2>&1 | grep ssl_module
Remediation
dnf install mod_ssl
# or
a2enmod ssl
6.1.2 Ensure SSLProtocol Is Set to TLSv1.2 or Higher (Automated)
L1 Auto
Description

This recommendation configures SSLProtocol to TLSv1.2 or Higher on the Apache HTTP Server 2.4 web server. Setting this value appropriately ensures the system operates within the security parameters defined by the CIS benchmark.

Rationale

An improperly configured value for SSLProtocol could weaken security controls or allow unintended behavior. Setting this to TLSv1.2 or Higher ensures the Apache HTTP Server 2.4 web server operates within a well-defined security boundary.

Audit
grep -r SSLProtocol /etc/httpd/conf.d/ssl.conf
Remediation
SSLProtocol -all +TLSv1.2 +TLSv1.3
6.1.3 Ensure SSLCipherSuite Is Configured for Strong Ciphers (Automated)
L1 Auto
Description

This recommendation verifies that sSLCipherSuite Is Configured for Strong Ciphers on the Apache HTTP Server 2.4 web server. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to sSLCipherSuite Is Configured for Strong Ciphers may leave the Apache HTTP Server 2.4 web server vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
grep SSLCipherSuite /etc/httpd/conf.d/ssl.conf
Remediation
SSLCipherSuite HIGH:!aNULL:!MD5:!3DES:!RC4:!DES:!EXPORT
SSLHonorCipherOrder on
6.1.4 Ensure SSL Compression Is Disabled (Automated)
L1 Auto
Description

This setting controls whether SSL Compression is disabled on the Apache HTTP Server 2.4 web server. Disabling this feature reduces the attack surface by removing unnecessary functionality that could be exploited by an attacker.

Rationale

Leaving SSL Compression enabled when it is not required unnecessarily expands the attack surface. An attacker could leverage this feature to gain unauthorized access or escalate privileges on the Apache HTTP Server 2.4 web server.

Audit
grep SSLCompression /etc/httpd/conf.d/ssl.conf
Remediation
SSLCompression off

6.2 HSTS & OCSP

▶
6.2.1 Ensure HSTS Is Enabled (Automated)
L1 Auto
Description

This setting controls whether HSTS is enabled on the Apache HTTP Server 2.4 web server. Enabling this feature strengthens the security posture by enforcing the recommended configuration via httpd.conf, apache2.conf, or site configuration files.

Rationale

Without HSTS enabled, the Apache HTTP Server 2.4 web server may lack critical protections against known attack vectors. Enabling this control mitigates risk and aligns the deployment with industry-accepted security baselines.

Audit
grep 'Strict-Transport-Security' /etc/httpd/conf/httpd.conf /etc/httpd/conf.d/*.conf
Remediation
# Requires mod_headers:
Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"
6.2.2 Ensure OCSP Stapling Is Enabled (Automated)
L2 Auto
Description

This setting controls whether OCSP Stapling is enabled on the Apache HTTP Server 2.4 web server. Enabling this feature strengthens the security posture by enforcing the recommended configuration via httpd.conf, apache2.conf, or site configuration files.

Rationale

Without OCSP Stapling enabled, the Apache HTTP Server 2.4 web server may lack critical protections against known attack vectors. Enabling this control mitigates risk and aligns the deployment with industry-accepted security baselines.

Audit
grep SSLUseStapling /etc/httpd/conf.d/ssl.conf
Remediation
SSLUseStapling on
SSLStaplingCache shmcb:/run/httpd/ssl_stapling(128000)

7 — Information Disclosure

▶

7.1 Server Identity

▶
7.1.1 Ensure ServerTokens Is Set to 'Prod' (Automated)
L1 Auto
Description

This recommendation configures ServerTokens to 'Prod' on the Apache HTTP Server 2.4 web server. Setting this value appropriately ensures the system operates within the security parameters defined by the CIS benchmark.

Rationale

An improperly configured value for ServerTokens could weaken security controls or allow unintended behavior. Setting this to 'Prod' ensures the Apache HTTP Server 2.4 web server operates within a well-defined security boundary.

Audit
grep ServerTokens /etc/httpd/conf/httpd.conf
# Should be: ServerTokens Prod
Remediation
ServerTokens Prod
7.1.2 Ensure ServerSignature Is Disabled (Automated)
L1 Auto
Description

This setting controls whether ServerSignature is disabled on the Apache HTTP Server 2.4 web server. Disabling this feature reduces the attack surface by removing unnecessary functionality that could be exploited by an attacker.

Rationale

Leaving ServerSignature enabled when it is not required unnecessarily expands the attack surface. An attacker could leverage this feature to gain unauthorized access or escalate privileges on the Apache HTTP Server 2.4 web server.

Audit
grep ServerSignature /etc/httpd/conf/httpd.conf
Remediation
ServerSignature Off
7.1.3 Ensure Custom Error Pages Are Defined (Manual)
L1 Manual
Description

This recommendation verifies that custom Error Pages Are Defined on the Apache HTTP Server 2.4 web server. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to custom Error Pages Are Defined may leave the Apache HTTP Server 2.4 web server vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
grep ErrorDocument /etc/httpd/conf/httpd.conf
Remediation
ErrorDocument 404 /errors/404.html
ErrorDocument 500 /errors/500.html
7.1.4 Ensure ETag Header Is Configured to Prevent Information Leakage (Automated)
L2 Auto
Description

This recommendation verifies that eTag Header Is Configured to Prevent Information Leakage on the Apache HTTP Server 2.4 web server. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to eTag Header Is Configured to Prevent Information Leakage may leave the Apache HTTP Server 2.4 web server vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
grep FileETag /etc/httpd/conf/httpd.conf
Remediation
FileETag MTime Size

8 — Denial of Service Mitigations

▶

8.1 Timeouts & Limits

▶
8.1.1 Ensure the Timeout Directive Is Set to 10 Seconds or Less (Automated)
L1 Auto
Description

This recommendation configures the Timeout Directive to 10 Seconds or Less on the Apache HTTP Server 2.4 web server. Setting this value appropriately ensures the system operates within the security parameters defined by the CIS benchmark.

Rationale

An improperly configured value for the Timeout Directive could weaken security controls or allow unintended behavior. Setting this to 10 Seconds or Less ensures the Apache HTTP Server 2.4 web server operates within a well-defined security boundary.

Audit
grep '^Timeout' /etc/httpd/conf/httpd.conf
Remediation
Timeout 10
8.1.2 Ensure KeepAlive Is Enabled (Automated)
L1 Auto
Description

This setting controls whether KeepAlive is enabled on the Apache HTTP Server 2.4 web server. Enabling this feature strengthens the security posture by enforcing the recommended configuration via httpd.conf, apache2.conf, or site configuration files.

Rationale

Without KeepAlive enabled, the Apache HTTP Server 2.4 web server may lack critical protections against known attack vectors. Enabling this control mitigates risk and aligns the deployment with industry-accepted security baselines.

Audit
grep KeepAlive /etc/httpd/conf/httpd.conf
Remediation
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
8.1.3 Ensure the RequestReadTimeout Directive Is Set (Automated)
L1 Auto
Description

This recommendation verifies that the RequestReadTimeout Directive Is Set on the Apache HTTP Server 2.4 web server. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to the RequestReadTimeout Directive Is Set may leave the Apache HTTP Server 2.4 web server vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
httpd -M 2>&1 | grep reqtimeout
grep RequestReadTimeout /etc/httpd/conf/httpd.conf
Remediation
# Requires mod_reqtimeout:
RequestReadTimeout header=20-40,MinRate=500 body=20,MinRate=500
8.1.4 Ensure LimitRequestLine and LimitRequestFields Are Set (Automated)
L2 Auto
Description

This recommendation verifies that limitRequestLine and LimitRequestFields Are Set on the Apache HTTP Server 2.4 web server. Implementing this control strengthens the overall security configuration and reduces exposure to potential threats.

Rationale

Failure to limitRequestLine and LimitRequestFields Are Set may leave the Apache HTTP Server 2.4 web server vulnerable to attack or non-compliant with organizational security policies. This control helps establish a consistent, hardened configuration baseline.

Audit
grep -E 'LimitRequestLine|LimitRequestFields|LimitRequestFieldSize|LimitRequestBody' /etc/httpd/conf/httpd.conf
Remediation
LimitRequestLine 512
LimitRequestFields 100
LimitRequestFieldSize 1024
LimitRequestBody 102400