Domain log files getting HUGE

nealdxmhost

Verified User
Joined
Jan 1, 2009
Messages
232
Location
Los Angeles CA
Feeling like a total NOOB here but I seem to be overlooking something in the latest server I put up and some of the log files in /var/log/httpd/domains are getting really HUGE, we are talking in excess of 1GB (mainly error logs) and a couple of times a day I end up having to login and blank them out with cat /dev/null > domainname.error.log

Needless to say I am scratching my head as to what I gotta do to get the system to rotate the log files as it has been so long since I have had to deal with that now I am kicking myself for not making notes on how I did it before.

Any ideas/suggestions?

--Neal
 
Hello,

And what is there special in error logs? PHP errors? Maybe need to fix the errors? Or change LogLevel?
 
Hello,

And what is there special in error logs? PHP errors? Maybe need to fix the errors? Or change LogLevel?

Definitely PHP related as I have quite a few php sites on the server and some of them got fouled after the migration from the old server to the new one. and the ones with the HUGE log files happen to be php. Luckily I have gotten most of the sites fixed but there are still a few giving me headaches.

As for changing the loglevel, I am trying to wrap my head around how to do that at the moment.
 
Thanks Alex,

I get that part but maybe I did not say it or ask it the right way, trying to find out if there is way to limit the size of a log file and once hits a certain size it gets rotated out. Does that make sense?

By default in /etc/httpd/conf/httpd.conf

Code:
LogLevel warn

is used, and you might want to set it to crit or even alert.

http://httpd.apache.org/docs/2.2/mod/core.html#loglevel
 
Back
Top