Stop access log creation for (sub)domain

PatrickVeenstra

Well-Known Member
Feb 12, 2012
171
6
68
Barcelona
cPanel Access Level
Root Administrator
One of my subdomains receives a LOT of requests, and because of that it always has a very big logfile. There's nothing in that log that can be of any interest to me, so: is it possible to not create an log for a specific subdomain / domain / account?
 

twhiting9275

Well-Known Member
Sep 26, 2002
560
28
178
cPanel Access Level
Root Administrator
Twitter
Sure, though I have no idea how long it'll stick around. This would probably be a good idea for feature requests , honestly.

Login to SSH (root)
In /usr/local/apache/conf/httpd.conf, find the lines something like this:

Code:
  CustomLog /usr/local/apache/domlogs/sub.domain.com combined
  <IfModule log_config_module>
    <IfModule logio_module>
      CustomLog /usr/local/apache/domlogs/sub.domain.com "%{%s}t %I .\n%{%s}t %O ."
    </IfModule>
  </IfModule>
Rip 'em out, entirely. Delete 'em ;)

then run
Code:
 /usr/local/cpanel/bin/apache_conf_distiller --update
Then backup your httpd.conf
Code:
cp /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd-backup.conf
Then run
Code:
/usr/local/cpanel/bin/build_apache_conf
and verify that the changes you made are still there. If so, one final command.

Code:
service httpd restart
I'm fairly certain that's good for both ea3 and ea4, but someone will correct me if I'm wrong.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463