Home Contact Us Search

[ Order a Server ] [ Server Support ]


[ Getting Started ] [ Server Help ] [ Add on Help ] [ Solution ] [ Trouble Shooting ]

PLEASE NOTE, THIS IS VERY OLD ARCHIVE INFORMATION AND MAY NOT FUNCTION ON NEW SERVERS

[ DNS ] [ Email ] [ Server Admin ] [ Web Server ]

Rotating Web Server Log Files

You can use the rotatelogs utility to rotate your Virtual Server web server log files. Basically, rotatelogs is a wrapper that you include in the Log definitions in the /www/conf/httpd.conf file on your Virtual Server:
TransferLog "|rotatelogs /www/logs/access_log 86400"
This creates the files /www/logs/access_log.nnnn where nnnn is the system time at which the log starts (system time is the number of seconds that have elapsed since January 1, 1970). At the end of each rotation time (here after 24 hours) a new log is started.

In order to use the rotatelogs wrapper you must copy the rotatelogs executable into your local directory structure. To do this, telnet or ssh to your Virtual Server and execute the following command:

% cp /usr/local/bin/rotatelogs ~/usr/bin

You can rotate the other web server log files as well:

AgentLog "|/usr/local/bin/rotatelogs /www/logs/agent_log 86400"    
RefererLog "|/usr/local/bin/rotatelogs /www/logs/referer_log 86400"
ErrorLog "|/usr/local/bin/rotatelogs /www/logs/error_log 86400"

[ DNS ] [ Email ] [ Server Admin ] [ Web Server ]

PLEASE NOTE, THIS IS OLD ARCHIVE INFORMATION AND MAY NOT FUNCTION ON NEW SERVERS