Hello,
I have discovered that my access_log is occupying most of my HDD. It's over 200 GB in size. How can I reset it ?
I am using Apache 2.2.3 on a CentOS server with Plesk.
Thank you guys !
Hello,
I have discovered that my access_log is occupying most of my HDD. It's over 200 GB in size. How can I reset it ?
I am using Apache 2.2.3 on a CentOS server with Plesk.
Thank you guys !
Rename the file to different filename and create new file with the name access_log
Use the logrotate daemon in order to have a clean maintenance of your logs, specially, the apache related logs.
A brief info about logrotate: http://www.scriptinstallation.in/logrotate.html
If you have access by SSH to the server, then you can:
1) Gzip the old file (text files compression ratios are really good). If we assume the file is named /var/log/apache/access.log then do this:
gzip -c /var/log/apache/access.log > /var/log/apache/access.log.gz
2) Clear the current file
echo > /var/log/apache/access.log
3) Restart apache
Also as Dez has suggested consider using logrotate for production grade apache log archiving.