How to permanently disable domlogs?

OooLong

Well-Known Member
Mar 16, 2011
105
1
68
cPanel Access Level
Website Owner
Hi,

Recently I tried to disable domlogs by editing /etc/httpd/conf/httpd.conf and comment out the two CustomLog field for a domain because the logs it were generating were quite large and fast. But after a few days the domlogs is working again and the CustomLog revert back to its previous state. How do I make the comment out last permanently in httpd.conf? Thanks in advance.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,228
463
I don't see a /usr/local/apache/conf/userdata folder. Do I need to create one?
The directory structure is not created automatically. You will need to create those directories if they do not yet exist.

Thank you.
 

OooLong

Well-Known Member
Mar 16, 2011
105
1
68
cPanel Access Level
Website Owner
/usr/local/apache/conf/userdata/std/2_4/$user/$domain/$includename.conf

I'm done creating directory structure as instructed. Do I just repeat adding this CustomLog and comment it out, and that will overwrite the setting in httpd.conf? is this correct?

includename.conf:
#CustomLog /usr/local/apache/domlogs/domain.com combined
#CustomLog /usr/local/apache/domlogs/domain.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."

thank you.
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,228
463
I would use the instructions under:

"Custom templates that will apply to a single virtual host"

This way you can directly modify the "CustomLog" entries for the domain name in it's VirtualHost template.

Thank you.