In order to keep your Web Server log files from wasting your disk space, you will occasionally need to rotate your log files. Some Log Analyzers can do this for you, or you can use one of the following tools.

Savelogs

savelogs is meant to be a complete web server log rotation program. savelogs can rename, archive, compress, and delete (or any combination of the above) as well as provide newsyslog-type log rotation (see newsyslog(8) for details). Options may be specified on the command line or in a configuration file. Besides archiving single logs, savelogs can search your Web Server Configuration File and automatically rotate logs defined there.

Installation

To install savelogs, follow these instructions:

Connect to your server via SSH, su to root, and run this command:

# vinstall savelogs

(t)csh shell users may have to rehash their path before running savelogs or viewing the man page:

# rehash

A sample configuration file has been placed in /usr/local/etc/savelogs.conf.sample. If you wish to use the configuration file, we copy this file to /usr/local/etc/savelogs.conf.

Documentation

See the savelogs Man Page:

# man savelogs

Also check out the rotation Man page:

# man rotation

 

Rotatelogs

Rotatelogs is an Apache script designed to cycle your Web server log files on a regular basis. You can load it directly in your Apache configuration file (/usr/local/apache/conf/httpd.conf) by modifying the TransferLog to look similar to the following.

TransferLog "|/usr/local/apache/bin/rotatelogs /usr/local/apache/logs/access_log 86400"

For more information about using rotatelogs, you can see the man page by running man rotatelogs from the server command prompt.

Please note: the information on this page applies to ITS web hosting plans. It may or may not apply to other environments. If you are looking for a feature described here, or better support from your hosting provider, please consider hosting your site with ITS!

1555 N Naperville/Wheaton Road, Suite 107
Naperville, IL 60563
phone 630.420.2550
fax 630.420.2771