Chapter 14. Apache HTTP Server
197
other words, after a reverse lookup is performed, a forward lookup is performed on the result. At least
one of the IP addresses in the forward lookup must match the address from the first reverse lookup.
Generally, you should leave
HostnameLookups
set to
off
, because the DNS requests add a load to
your server and may slow it down. If your server is busy, the effects of
HostnameLookups
will be
noticeable.
HostnameLookups
are also an issue for the Internet as a whole. All of the individual connections
made to look up each hostname add up. Therefore, for your own Web server's benefit, as well as for
the good of the Internet as a whole, you should leave
HostnameLookups
set to
off
.
If you like to see the hostnames in your log files, consider running one of the many log analyzer tools
that perform the DNS lookups more efficiently and in bulk when you come to rotate your log files.
14.5.38.
ErrorLog
ErrorLog
names the file where server errors are logged. As this directive indicates, the error log file
for your Web server is
/var/log/httpd/error_log
.
The error log is a good place to look if your Web server generates any errors or fails, and you are not
sure what happened.
14.5.39.
LogLevel
LogLevel
sets how verbose the error messages in the error logs will be.
LogLevel
can be set (from
least verbose to most verbose) to
emerg
,
alert
,
crit
,
error
,
warn
,
notice
,
info
or
debug
. The
default
LogLevel
is
warn
.
14.5.40.
LogFormat
The
LogFormat
directives in your
httpd.conf
file set up a format for the messages in your access
log. The actual
LogFormat
used will depend on the settings given in the
CustomLog
directive (see
Section 14.5.41).
14.5.41.
CustomLog
CustomLog
identifies the log file and the log file format. In your Web server's default
configuration,
CustomLog
defines the log file in which accesses to your Web server are recorded:
/var/log/httpd/access_log
. You will need to know the location of this file if you want to
generate any access based server performance statistics for your Web server.
CustomLog
also sets the log file format to combined. The common logfile format looks like this:
remotehost rfc931 authuser [date] "request" status bytes referer user agent
remotehost
The remote hostname. If the hostname is not available from DNS, or if
HostnameLookups
is
set to
Off
, then
remotehost
will be the IP address of the remote host.
rfc931
Not used. You will see a
in the log file in its place.
footer
Our partners:
PHP: Hypertext Preprocessor Best Web Hosting
Java Web Hosting
Inexpensive Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Jsp Hosting
Cheap Hosting
Visionwebhosting.net Business web hosting division of Web
Design Plus. All rights reserved