| name | cis-apache-6.1 |
| description | Ensure the Error Log Filename and Severity Level Are Configured Correctly |
| category | cis-apache |
| version | 3.6.0 |
| author | cyberstrike-official |
| tags | ["cis","apache","linux","logging","monitoring"] |
| cis_id | 6.1 |
| cis_benchmark | CIS Apache HTTP Server 2.2 Benchmark v3.6.0 |
| tech_stack | ["linux","apache"] |
| cwe_ids | [] |
| chains_with | [] |
| prerequisites | [] |
| severity_boost | {} |
Ensure the Error Log Filename and Severity Level Are Configured Correctly
Description
The LogLevel directive is used to configure the severity level for the error logs, while the ErrorLog directive configures the log file name. The log level values are the standard syslog levels of emerg, alert, crit, error, warn, notice, info and debug. The recommended level is notice, so that all errors from the emerg level through the notice level will be logged.
Rationale
The server error logs are invaluable because they can be used to spot potential problems before they become serious. Most importantly, they can be used to watch for anomalous behavior such as numerous "not found" or "unauthorized" errors that may be an indication an attack is pending or has occurred.
IMPORTANT NOTE
The Apache httpd server stopped including 404 not found errors in its error log several years ago. Not including the 404 errors may cause log monitoring and host intrusion detection and prevention software to miss web scanning attacks which cause a large number of not found errors, and may fail to block the attack. For Apache 2.4 benchmark we have recommended using "notice core:info" in order to pick up the 404 errors. However, in Apache 2.2, the LogLevel directive doesn't support multiple levels. So the same recommended solution is not available. There are three alternatives to consider:
-
Set the LogLevel to info – However this may create excessive logs, especially for TLS connections. The excessive logs may overwhelm the log monitoring processes.
-
Adapt the log monitoring and IDS to monitor the access logs. Which are much more frequent and may also overwhelm the log monitoring system.
-
Upgrade to Apache 2.4.
For historical context: