Disable Access/Error Logging

Wiz01

Verified User
Joined
Dec 15, 2011
Messages
8
Hello,

How can i disable the error and access logging related to domains?
(/domains/mydomain.com/logs)

It's included in the backup too, so it's a little annoying.

Thanks in advance!

Wiz
 
Hello,

I've got 2 possible ways, one of them I'll post bellow:

Code:
cd /usr/local/directadmin/data/templates
cp virtual_host2*.conf custom
cd custom

Open one by one files in /usr/local/directadmin/data/templates/custom

virtual_host2.conf
virtual_host2_secure.conf
virtual_host2_secure_sub.conf
virtual_host2_sub.conf

and replace

Code:
        CustomLog /var/log/httpd/domains/|DOMAIN|.log combined
        ErrorLog /var/log/httpd/domains/|DOMAIN|.error.log

Code:
        CustomLog /dev/null
        ErrorLog /dev/null

and after that run

Code:
echo "action=rewrite&value=httpd" >> /usr/local/directadmin/data/task.queue

and restart apache.
 
Last edited:
By the way, you can disable rotating of the logs, which directadmin does, and after that enable your own scheme of rotating. Since you rotate logs in different place (with syste logrotate for example), they won't be included in backups.
 
Thanks for the useful answer!

Just one thing:
Is that correct to replace the CustomLog line with AccessLog?
Or it's just a typo?
 
There's an other line: CustomLog /var/log/httpd/domains/|DOMAIN|.bytes bytes

Do i need to do something with this?
Thanks!
 
I followed the tutorial, but i can't restart apache:

An error has occurred
Details
/sbin/service httpd restart 2>&1
 
I just asked my server manager.

In virtual_host2.conf the correct replacement is:

CustomLog /dev/null combined
ErrorLog /dev/null
 
Back
Top