Bentok

Active Member
Jan 14, 2015
26
1
53
cPanel Access Level
Website Owner
Is there possible to disable access_log in cpanel? I commented httpd.conf but each time on update or anything the configuration uncomment the log line.. I mean is there any setting to do so it won't do that or just disable it?

# CustomLog logs/access_log combined env=!isproxyrequest

Appreciate the advise!
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
13,427
2,111
363
cPanel Access Level
Root Administrator
Hey there! Editing the httpd.conf file on a cPanel server is not supported, as it will be overwritten with each nightly update due to all the various ways that cPanel tools interact with and create that file.

It may be best to edit the pre_virtualhost_global.conf include file as outlined here for those changes to stick: Advanced Apache Configuration | cPanel & WHM Documentation
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
13,427
2,111
363
cPanel Access Level
Root Administrator
@trustnoone - if the issue is with the access_log becoming too large, I would recommend log rotation tools first instead of disabling that file. That can be done through WHM >> Apache Configuration under the Log Rotation section. You can also enable the WHM >> Tweak Settings option of "Delete each domain’s access logs after statistics are gathered" to save on disk space.

If you have piped logging enabled, you could use the details mentioned at The splitlogs Binary | cPanel & WHM Documentation to customize the splitlog binary to further change the behavior.