Per domain error_log rotation by DA

jelle.t86

New member
Joined
Dec 5, 2014
Messages
2
Hello everyone,

For a couple of weeks now, I'm trying to find a way to control the rotation of the error logs stored in /var/log/httpd/domains/.
DirectAdmin Support stated in an old thread (which doesn't have the solution to my problem) that files in /var/log/httpd/ are controlled by logrotate, files in /var/log/httpd/domains/ are controlled by DA.
I send an e-mail to DA-support, but still no answer after two weeks... So 'll try it here.

These logs are rotated daily, but old ones are deleted instead of saved like example.com.error.log.1 .

Why keep the error logs instead of fixing errors you may ask?
Well, I would like to fix all errors, but if an error occurs at, let's say 11:30 PM, I have no way of knowing about those errors the next morning!

How can I get DA to treat the error logs just like the access logs (keep them for a specified amount of time)?
I have not found any files which seem to have any influence on those log-files, but they must be present somewhere.

I'm open to solutions which operate outside DA, but if possible, I prefer changes to the existing logrotation-feature.

Thank you in advance!

Jelle
 
Hello,

I vaguely recall replying to a similar email a while back... (not sure if it was you, or someone else)
In any case, you can disable rotation with the option:
Code:
rotation=0
in the directadmin.conf.
But.. it's then up to you to control the rotation of all *.log files, which you can do by adding it to the /etc/logrotate.d/apache file.

DA will do the .bytes files, so leave those out of logrotate.

John
 
Thank you for the response!

Since I didn't receive any response, I think it someone else asked the same ;)

I'll have a look at implementing this solution. Looks like this is what i'm looking for.

Jelle
 
Back
Top