changed apache log place, log doesn't rotate anymore

sgala

Verified User
Joined
Jul 10, 2017
Messages
26
Hi
Have a site,
/home/admin/domains/mydomain.com/logs - here logs were stored in tar.gz format, day by day.

some time ago I set up httpd conf ( in usr/local/directadmin/data/users/admin ) like this
CustomLog /home/admin/domains/mydomain.com/log/mydomain.com.log combined
ErrorLog /home/admin/domains/mydomain.com/log/mydomain.com.error.log
because I need my current logs nearby.

But now I noticed, that mydomain.com.log grow and grow, w/o daily rotation.
And in same time in /home/admin/domains/mydomain.com/logs no more tar.gz logs created

I wonder if there any way to fix it?
I want old fashion behavior, when mydomay.com.log store data only for current day
and after this day it archieved and go to /logs folder.

How do I do it?
 
Hello,

Try and change any of these defaults (depending on your setup and needs):

Code:
logdir=/var/log/directadmin
apachelogdir=/var/log/httpd/domains
nginxlogdir=/var/log/nginx/domains

in /usr/local/directadmin/conf/directadmin.conf (add any of those lines if you are missing and restart directadmin)

but if you have more than 1 user you can't use Directadmin logrotation any longer, so you will need to disable rotation:

Code:
rotation=0

and use your own solution for rotation of logs.

related:

https://help.directadmin.com/item.php?id=284
 
Back
Top