Adam works as a Security Analyst for Umbrella Inc. The company has a Linux-based network
comprising an Apache server for Web applications. He received the following Apache Web server
log, which is as follows:
[Sat Nov 16 14:32:52 2009] [error] [client 128.0.0.7] client denied by server configuration:
/export/home/htdocs/test
The first piece in the log entry is the date and time of the log message. The second entry
determines the severity of the error being reported.
Now Adam wants to change the severity level to control the types of errors that are sent to the
error log. Which of the following directives will Adam use to accomplish the task?
A.
CustomLog
B.
ErrorLog
C.
LogFormat
D.
LogLevel
Explanation:
The LogLevel directive is used in server Error log of the Apache Web server log. This directive is
used to control the types of errors that are sent to the error log by constraining the severity level.
Eight different levels are present in the LogLevel directive, which are shown below in order of their
descending significance:Note: When a certain level is specified, the messages from all other levels of higher significance
will also be reported. For example, when LogLevel crit is specified, then messages with log levels
of alert and emerg will also be reported.
Answer option B is incorrect. The ErrorLog directive is used to set the name and location of the file
to which the server will log any errors it encounters. If the file-path does not begin with a slash sign
(/), it is assumed to be relative to the ServerRoot. If the file-path begins with a pipe sign (|), then it
is assumed to be a command that handles the error log.
Answer option A is incorrect. The CustomLog directive is used to log requests to the server. The
format of the log is specified and the logging can be made conditional on request characteristics
with the help of environment variables. Environment variables can be adjusted on a per-request
basis with the help of the mod_setenvif or mod_rewrite module.
Answer option C is incorrect. The LogFormat directive can exist in one of the two forms. In the first
form, only one argument is specified; and in the second form explicit format with a nickname is
associated. This directive specifies the log format that is used by logs specified in subsequent
TransferLog directives.