How to disable archiving of httpd logs

JimDeadlock

Verified User
Joined
Mar 11, 2023
Messages
11
I'm new to DirectAdmin and I've noticed that the raw logs in:

/var/log/httpd/domains/

... are archived daily into:

/home/myuser/domains/mydomain.com/logs

I would like to disable this archiving and have only the files in /var/log/httpd/domains
 
So in fact you don't want to disable archiving but you want to disable logging to the user directory.
Any specific reason for that? Because those are used so the user can view logging from the DA panel when they log in.

Anyway, to disable loggin to the user directory you could use this guide:
 
I have a VPS and I am the only user on it, so allowing users to see their own logs is unnecessary, and I don't need to use the DA log viewer.

What I'm trying to achieve is for the raw logs to be written at /var/log/httpd/domains/domain.com.log (as per Apache Virtualhost directives), and then have them rotated by my settings in /etc/logrotate.d/apache without any interference from DA.

My problems are:

1. DA is overwriting my custom settings in /etc/logrotate.d/apache

2. DA is purging the raw logs daily, and archiving them in /home/myuser/domains/mydomain.com/logs

I've discovered the following item in the DA panel and I've set it to 0, I'll see if this makes any difference.

Admin > Server Manager > Administrator Settings > Server Settings > Keep Number of Apache Log Backups
 
UPDATE: I've discovered a 10 year old forum post that mentions rotation=0 in directadmin.conf, I think this is what I'm looking for.
 
What I'm trying to achieve is for the raw logs to be written at /var/log/httpd/domains/domain.com.log
They are already written there by default. But I see now the issue was the rotating, that was not quite clear in the initial question.

I think this is what I'm looking for.
That would disable log rotation of Apache logs indeed, which would be your solution.

The other setting in the server manager would only effect the logfiles in the user's directory if I'm not mistaken.
 
Back
Top