Pivotal Knowledge Base

Follow

Log file rotation in Apache HTTP Server, vFabric Enterprise Ready Server, and vFabric Web Server (2010979)

Log file rotation in Apache HTTP Server, vFabric Enterprise Ready Server, and vFabric Web Server (2010979)

Purpose

This article provides information on log rotation in Apache HTTP Server, vFabric Enterprise Ready Server (ERS), and vFabric Web Server.

Resolution

Log files can become very large in size without log rotation. The log file rotation is implemented using the rotatelogs utility that is provided with httpd. This utility allows you to define when to rotate logs. The rotatelogs utility uses piped logs.
 
An example of rotatelogs using piped log is:

CustomLog "|/path/to/ers/apache2.2/bin/rotatelogs /var/log/access_log 86400" common

This opens an access log file named access_log located at the /var/log/ directory using the log format defined by the name common. The access_log file is then rotated every day at midnight.

You may also use the log rotation features provided by your operating system vendor for more granular control of log rotation. Linux users can use the logrotate command. Solaris users can use logadm.
 
To ensure compatibility with the log rotation utilities of the operating system, you may have to modify the location variables for the httpd executable or the PID file for the running httpd process .

Additional Information

©VMware 2013

Comments

Powered by Zendesk