View Full Version : Deleting Apache Logs
minnseoelite
April 13th, 2007, 05:13 PM
Just wondering how to go about deleting old Apache error logs. Can I just delete them through FTP and then remote restart my VPS server. Anything else I can do to try and speed up response time (already turned off AWstats)
jakkz
April 13th, 2007, 05:31 PM
Disable the logs forever.
fr0zen
April 13th, 2007, 05:43 PM
Just wondering how to go about deleting old Apache error logs. Can I just delete them through FTP and then remote restart my VPS server. Anything else I can do to try and speed up response time (already turned off AWstats)
Deleting logs won't speed up response time. Why would you restart your VPS? Restart Apache. Your host configures logging since your on a VPS. Delete the logs thru FTP or SSH. They will most likely rotate themselves at a set time, a time set by your host in their configuration. You cannot do much on a VPS to optimize performance - except tweak your code.
It's good practice to keep logs - you will learn this is true when you run a real server when you want to keep an eye on security and such.
minnseoelite
April 13th, 2007, 05:51 PM
Ok cool thanks
MyspaceGeeks
April 13th, 2007, 05:52 PM
cd /usr/local/apache/domlogs/
rm -rf *
[Thats for domain logs, if you want to know how to delete error logs, just ask =] ]
MyspaceGeeks
April 13th, 2007, 06:04 PM
Oh, and its best to /etc/init.d/httpd restart after you delete logs. (restart apache)
fr0zen
April 13th, 2007, 06:27 PM
cd /usr/local/apache/domlogs/
rm -rf *
[Thats for domain logs, if you want to know how to delete error logs, just ask =] ]
Be careful with recommending that to people. That can hose an entire server. It also depends on what distro the person is using. On Freebsd you could use something like this:
cd /var/log/ && rm - rf httpd-*
Oh, and its best to /etc/init.d/httpd restart after you delete logs. (restart apache)
One again that depends on the Distro. It can be as easy as apachectl restart... or /etc/init.d/httpd restart, or service httpd stop, etc.. etc...
omen
April 13th, 2007, 06:32 PM
cd /usr/local/apache/domlogs/
rm -rf *
[Thats for domain logs, if you want to know how to delete error logs, just ask =] ]
Great way to get rid of competition.. Could you imaging that.. some big MSRS's server getting hosed. :2guns:
MyspaceGeeks
April 13th, 2007, 06:36 PM
I was just telling him what I do :)
vBulletin® v3.7.1, Copyright ©2000-2008, Jelsoft Enterprises Ltd.