12.07.2015 Views

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

336CHAPTER 15Creating a Web Server with the Apache HTTP ServerLogging ConnectionsBy default, log messages from the Apache HTTP server are written to the /var/log/httpd/directory. When a file is transferred to a client, information such as the IP address of theclient, the file transferred, a time stamp, and the client’s browser are written to the transferlog. By default, the transfer log is set to access_log in the /var/log/httpd/ directory.Error messages and messages from starting and stopping the server are written to theerror_log file. If you have enabled SSL connections on the web server, any secure transfersare recorded in ssl_access_log, and any server messages are written tossl_error_log.These log files are rotated using the logrotate utility. By default, new log files are startedevery week, and four weeks of log files are kept.The following directives control logging:TransferLogFilename for the transfer log. If the filename does not begin with a forward slash(/), it is relative to the server root. Default value: logs/access_logNOTEBecause the default value of logs/access_log does not start with a forward slash, itis relative to the server root, which is /etc/httpd by default. However, the /etc/httpd/logs/ directory is a symbolic link to the /var/log/httpd/ directory to allowApache to follow the FHS guidelines of log files being located in /var/log/. Thus, thefull path to the default transfer log is /var/log/httpd/access_log.ErrorLogLogFormatLogLevelCustomLogFilename for the error log. If the filename does not begin with a forward slash(/), it is relative to the server root. Default value: logs/error_logFormat used when writing log messages. Refer to the apache.org directive pagefor details on the available formats. The mod_log_config module must be loadedfor this directive.Level of log messages written to the error log file. Possible values include debug,info, notice, warn, error, crit, alert, and emerg. The debug log level producesthe most messages, and emerg only logs messages about the system being unusable.Default value: warnSets the filename of the transfer log and format of the log file. Can be used insteadof using both TransferLog and LogFormat. Refer to the apache.org directive pagefor details. The mod_log_config module must be loaded for this directive.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!