Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'The easy way of doing this' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
The easy way of doing this
Authored by: simonboyle on Aug 02, '02 02:51:22PM

I find that the easiest way to stop log files becoming unmanageable is to use the supplied log rotation script. To activate it, in the file
/etc/httpd/httpd.conf
change the line

CustomLog "/private/var/log/httpd/access_log" common

to

CustomLog "|/usr/sbin/rotatelogs /private/var/log/httpd/access_log 86400" combined

(all on one line). This will start a new log file every 86400 seconds (1 day). The combined log format yields slightly more useful information for stats. See the supplied manual for details (/Library/Documentation/Services/apache/logs.html). On MacOS X, I find it's normally safer to use the sharing preference panel to start and stop the server unless you've compiled and installed your own version. Hope this helps



[ Reply to This | # ]