SV-214232r960879_rule
V-214232
SRG-APP-000089-WSR-000047
AS24-U1-000070
CAT II
10
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
Verify the Log Configuration Module is loaded:
# httpd -M | grep -i log_config_module
Output: log_config_module (shared)
If the "log_config_module" is not enabled, this is a finding.
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"
Note: The apachectl front end is the preferred method for locating the Apache httpd file. For some Linux distributions, "apache2ctl -V" or "httpd -V" can also be used.
Search for the directive "LogFormat" in the "httpd.conf" file:
# cat /<path_to_file>/httpd.conf | grep -i "LogFormat"
If the "LogFormat" directive is missing, this is a finding:
An example is:
LogFormat "%a %A %h %H %l %m %s %t %u %U \"%{Referer}i\" " common
V-214232
False
AS24-U1-000070
Verify the Log Configuration Module is loaded:
# httpd -M | grep -i log_config_module
Output: log_config_module (shared)
If the "log_config_module" is not enabled, this is a finding.
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"
Note: The apachectl front end is the preferred method for locating the Apache httpd file. For some Linux distributions, "apache2ctl -V" or "httpd -V" can also be used.
Search for the directive "LogFormat" in the "httpd.conf" file:
# cat /<path_to_file>/httpd.conf | grep -i "LogFormat"
If the "LogFormat" directive is missing, this is a finding:
An example is:
LogFormat "%a %A %h %H %l %m %s %t %u %U \"%{Referer}i\" " common
M
3996