CPanel Apache how to disable domlogs

Many users, website owners have problem with huge ammount of apache log files on high traffic websites. Lot of thoes website dose not require any logging, or users does not have any need for logs. One of the problem with this logging is server crashing due to 100% disk space usage.. and if user need to disable this kind of logging on server, it need to be done in apache config file. So lets see what is needed to disable this logging.

edit /etc/httpd/conf/httpd.conf

and you can just comment lines like this :

#CustomLog /usr/local/apache/domlogs/website.com combined
#CustomLog /usr/local/apache/domlogs/website.com-bytes_log “%{%s}t %I .\n%{%s}t %O .”

That will be everything what you need to disable logging for this website.com domain. But if you need to disable custom logging for all accounts on server you can just run this command and it will comment all customlog lines in httpd.conf:

sed -i.bak ‘s/ CustomLog/ #CustomLog/’ /usr/local/apache/conf/httpd.conf

After this just run service httpd restart or /etc/init.d/httpd restart

You can alos add this command to posteasyapache file in /usr/local/cpanel/scripts/posteasyapache to get this customlogs commented after any easyapache upgrade or use.