A AlterEgo Guest Jul 5, 2005 #1 Can someone explain me how i can rotate the access_log in /var/log/httpd/access_log ? It's realy huge (about 5 gig a day) and i realy don't need it ! Thanks!
Can someone explain me how i can rotate the access_log in /var/log/httpd/access_log ? It's realy huge (about 5 gig a day) and i realy don't need it ! Thanks!
S serve-you.net Guest Jul 5, 2005 #2 create /etc/logrotate.d/httpd with the following. If will likely fail on that 5 gig log though. If you dont need it, I would stop apache, delete it, and restart apache. /var/log/httpd/*log { missingok notifempty daily rotate 5 compress sharedscripts postrotate /bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null` 2> /dev/null || true endscript } Click to expand...
create /etc/logrotate.d/httpd with the following. If will likely fail on that 5 gig log though. If you dont need it, I would stop apache, delete it, and restart apache. /var/log/httpd/*log { missingok notifempty daily rotate 5 compress sharedscripts postrotate /bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null` 2> /dev/null || true endscript } Click to expand...
A AlterEgo Guest Jul 5, 2005 #3 Thanks, wil first try a new httpd... i think your 2nd solution will not work because it will recreate access_log automatic.
Thanks, wil first try a new httpd... i think your 2nd solution will not work because it will recreate access_log automatic.
S serve-you.net Guest Jul 5, 2005 #4 That's what it is supposed to do. Apache will not run without the access_log. It is defined in your httpd.conf.
That's what it is supposed to do. Apache will not run without the access_log. It is defined in your httpd.conf.
M mikk Basic Pleskian Jul 5, 2005 #5 You can always empty it with an hourly cron with somehting like 0 * * * * /bin/echo "" > /path/to/access_log (may need to use \"\" cant remember) seems strange for that log to be getting so large daily if its already set on rotation
You can always empty it with an hourly cron with somehting like 0 * * * * /bin/echo "" > /path/to/access_log (may need to use \"\" cant remember) seems strange for that log to be getting so large daily if its already set on rotation
S serve-you.net Guest Jul 5, 2005 #7 Originally posted by jamesyeeoc Wow, if his site is that busy, I wanna visit it too!!! lol Click to expand... seriously.
Originally posted by jamesyeeoc Wow, if his site is that busy, I wanna visit it too!!! lol Click to expand... seriously.
A AlterEgo Guest Jul 6, 2005 #8 Originally posted by mikk You can always empty it with an hourly cron with somehting like 0 * * * * /bin/echo "" > /path/to/access_log (may need to use \"\" cant remember) seems strange for that log to be getting so large daily if its already set on rotation Click to expand... Thanks that's also a good solution!
Originally posted by mikk You can always empty it with an hourly cron with somehting like 0 * * * * /bin/echo "" > /path/to/access_log (may need to use \"\" cant remember) seems strange for that log to be getting so large daily if its already set on rotation Click to expand... Thanks that's also a good solution!
A AlterEgo Guest Jul 6, 2005 #9 Originally posted by jamesyeeoc Wow, if his site is that busy, I wanna visit it too!!! lol Click to expand... Please send me a private message if you want to visit this site !
Originally posted by jamesyeeoc Wow, if his site is that busy, I wanna visit it too!!! lol Click to expand... Please send me a private message if you want to visit this site !