Sound Internet logo (link to home)

2375 University Ave. W. – Suite 210 – St. Paul, Minnesota 55114

Keep in touch with the world.

(612) 617-0007

> Quick Reference 
> Dialup Setup 
> DSL Setup 
> Connection Issues 
> E-Mail Setup 
> E-mail Problems 
> E-Mail Filtering 
> Domain Hosting 
> Newsgroups 
> Shell Access 
Member Tools
About Sound

Configuring Weblog Rotation

To conserve server space, the access and error logs for websites are regularly rotated into user home directories. Sound Internet's weblog rotation utility puts you in charge of your website's access and error logs by allowing you to control how often your logs are rotated and how many you wish to keep on the server.

Log Rotation Basics

Log rotation moves the access and error logs generated by the web server and places them in the home directory of your hosting account. As new files are added to your directory, older files are removed, keeping the number of log files retained in your account below a set amount. These logfiles are named based on your domain name, their current "freshness" in the rotation cycle and any pertinent file extensions. For example, the newest access log for would be "".

Default Rotation Settings

By default, logs are rotated daily and only the last 3 logsfiles are retained in your user directory. To conserve diskspace, these files are compressed via gzip.

Customizing rotation settings

The log rotation system allows you to customize:

  • how often your logs are rotated
  • the maximum number of logfiles to retain
  • whether or not your logs will be compressed
  • a shell script/command to be executed following rotation

These features are controlled by a configuration file named log.conf, which must be placed in the home directory of your hosting account (i.e., /home/username/log.conf). This file does not exist by default, so you may create it and add it to your account's home directory either through the shell or via ftp upload.

The configuration file is organized by pairs of options and settings, with one option allowed per line. If an option is not specified in the file, the default behavior is used. The configuration file syntax is shown in the table below:

Option Setting Option Description
RATE daily or weekly or monthly how often the logs are rotated
SAVE a number the maximum number of logs to retain
COMPRESS yes or no whether or not the logs will be compressed
COMMAND a valid shell command a shell command to be executed following rotation


Example #1
Keep the daily logs for the last week in uncompressed form.
Sample log.conf file:

Example #2
Keep weekly logs for the last month.
Sample log.conf file:
RATE weekly

Example #3
Keep monthly logs and send yourself a reminder when they have been rotated.
Sample log.conf file:
RATE monthly
COMMAND echo "New logfiles." | mail -s "You've got logs."

>Site Map