AS24-U1-000070 - The Apache web server must generate, at a minimum, log records for system startup and shutdown, system access, and system authentication events - log_config_module

Information

Log records can be generated from various components within the Apache web server (e.g., httpd, plug-ins to external backends, etc.). From a web server perspective, certain specific Apache web server functionalities may be logged as well. The Apache web server must allow the definition of what events are to be logged. As conditions change, the number and types of events to be logged may change, and the Apache web server must be able to facilitate these changes.

The minimum list of logged events should be those pertaining to system startup and shutdown, system access, and system authentication events. If these events are not logged at a minimum, any type of forensic investigation would be missing pertinent information needed to replay what occurred.


Satisfies: SRG-APP-000089-WSR-000047, SRG-APP-000092-WSR-000055, SRG-APP-000095-WSR-000056, SRG-APP-000096-WSR-000057, SRG-APP-000097-WSR-000058, SRG-APP-000098-WSR-000059, SRG-APP-000099-WSR-000061, SRG-APP-000100-WSR-000064

Solution

Determine the location of the 'HTTPD_ROOT' directory and the 'httpd.conf' file:

# apachectl -V | egrep -i 'httpd_root|server_config_file'
-D HTTPD_ROOT='/etc/httpd'
-D SERVER_CONFIG_FILE='conf/httpd.conf'

Uncomment the 'log_config_module' module line.

Configure the 'LogFormat' in the 'httpd.conf' file to look like the following:

LogFormat '%a %A %h %H %l %m %s %t %u %U '%{Referer}i' ' common

Restart Apache: apachectl restart

Note: The log format could be using different variables based on the environment; however it should be verified to ensure it is producing the same end result of logged elements.

The logging elements required breakdown as follows:
%a remote IP address
%A local IP address
%h IP address of requesting client
%H the request protocol
%l user ID of the requesting client
%m request method
%s status
%t time the request was received
%u user ID of the remote user
%U URL path requested

See Also

https://dl.dod.cyber.mil/wp-content/uploads/stigs/zip/U_Apache_Server_2-4_Unix_Y24M07_STIG.zip

Item Details

Category: AUDIT AND ACCOUNTABILITY

References: 800-53|AU-3, 800-53|AU-12a., 800-53|AU-14(1), CAT|II, CCI|CCI-000130, CCI|CCI-000131, CCI|CCI-000132, CCI|CCI-000133, CCI|CCI-000134, CCI|CCI-000169, CCI|CCI-001464, CCI|CCI-001487, Rule-ID|SV-214232r960879_rule, STIG-ID|AS24-U1-000070, STIG-Legacy|SV-102697, STIG-Legacy|V-92609, Vuln-ID|V-214232

Plugin: Unix

Control ID: dfdd07a04706c169a4814a3ac03d7264bc31c10709457d5c71a77e2c6fd146cc