Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rotating access_log - keeps creating new files. 2

Status
Not open for further replies.

stla

IS-IT--Management
Mar 12, 2003
190
DE
I edited my httpd.conf file adding this line:

CustomLog "|/usr/freeware/apache/sbin/rotatelogs /usr/freeware/apache/var/log/access_log 86400" common

My goal was to rotate the access log on a daily basis, ie. old and new. The problem is it keeps generating a new log every day with a time stamp suffix.

Does anyone know if my goal is achievable?

Best regards
 
Hi

I do not think you can do that. The [tt]rotatelogs[/tt] utility provided by Apache is not a full feature log rotating tool.

While you seems to be on a Unix/Unix-like operating system, look at [tt]logrotate[/tt]. Usually is part of the base install and can be instructed to keep only a given number of old files.

See man logrotate for usage and configuration file syntax.

Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top