• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

How to rotate /var/log/httpd/access_log ?

A

AlterEgo

Guest
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!
 
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
}
 
Thanks, wil first try a new httpd... i think your 2nd solution will not work because it will recreate access_log automatic.
 
That's what it is supposed to do. Apache will not run without the access_log. It is defined in your httpd.conf.
 
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
 
Wow, if his site is that busy, I wanna visit it too!!! lol
 
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

Thanks that's also a good solution!
 
Originally posted by jamesyeeoc
Wow, if his site is that busy, I wanna visit it too!!! lol

Please send me a private message if you want to visit this site ! ;)
 
Back
Top