How do you configure a linux server with apache to make a new log file each day and save the old ones? For example today's log file might be named access_log_16 (Aug-16). Tomorrow's might be named access_log_17. Will a large log file slow things down? If so what is the maximum safe size?
shorty
08-16-2001, 01:27 PM
you need to write a small logrotate script if you don't have one - could post it here but a bit large I think
shorty
mahinder
08-16-2001, 03:22 PM
Originally posted by shorty
you need to write a small logrotate script if you don't have one - could post it here but a bit large I think
shorty
do you know any ready script for that ? please provide link if possible. thanks.
also NVB. there is no limit for log files. i know that.
;)
shorty
08-16-2001, 04:26 PM
if you are running apache check /etc/logrotate.d/ you should have someting in there - also try
man logrotate
shorty
Thanks for all the help. I have the logrotate.d file. In the manual, it says that this should be run as a daily cron job. I have a file in /etc/cron.daily called logrotate. The file says,
#!/bin/sh
/usr/sbin/logrotate /etc/logrotate.conf
What do I have to do to start using the logrotate program?
shorty
08-16-2001, 05:02 PM
all you need do is check your /etc/logrotate.conf and make sure its set to do what you want - it lets you set how long to keep logs, what size to rotate them at, whether to compress them (takes extra resources but takes up less space in var)
shorty