Web Hosting Talk







View Full Version : How do I keep my RaQ from keeping logs


grsites
06-12-2001, 06:31 PM
How do I turn off the feature in my RaQ's Apache Web Server from keeping access logs? THe log file can get like 1GB big, I'd like to save resources.

Anybody know how? Thanks in advance for your help...

Steffen
06-16-2001, 11:28 AM
1. login via telnet or ssh
2. su (root)
3. go to /etc/logrotate.d
4. pico apache
5. edit the access entry (e.g. daily => hourly)

see 'man logrotate' for details ...

greetings
Steffen

qslack
06-16-2001, 12:40 PM
Or you could just do it the easy/lazy way.

ln access_log /dev/null

huck
06-18-2001, 09:13 AM
I would not disable logs entirely. Logs are critical if you should ever get attacked by a hacker.

Instead of disabling logs, you may want to rotate them more frequently. On a typical Cobalt install, the apache log rotation script is dropped into /etc/logrotate.d and is called apache. This script is ran on a daily basis via the logrotate script in /etc/cron.daily. The logrotate script's config file is in /etc/logrotate.conf. You can set compression and the number of backlogs to keep in this file.

You can also specify size limits. This will automatically rotate log files that exceed this size.

If you are getting your logs are still growing, you may want to rotate them twice a day.