Posted on 2006-05-03
Last Modified: 2008-01-09
hi guys,
have a linux box with whm on it,
how can i disable the domlogs on it?
i have to rotate it every 3-4 days when it reaches 2 gig and i want to know if there is a way to disable it,
Question by:djsoltan
    LVL 14

    Expert Comment

    Disable Logs

    Writing log information is a time consuming process. Although Apache keeps the log files open so that it's just a case of writing the information, this can take up valuable time. If storing log information is not required, you can save a few processor cycles by disabling it. To do this, simply comment out the log lines in the configuration file.

    LVL 14

    Expert Comment

    in /etc/httpd/httpd.conf

    Author Comment

    hi, can you tell me what line i need to comment out, i just went thro it and cant find it
    LVL 19

    Expert Comment

    I would better rotate logs automatically.
    check this page:

    the "Piped Logs" section has directions on how to modify the line (and what line it is) so a program can handle the rotation every "n" seconds.

    I would not disable logs since they are the key for bug hunting, and for log monitoring programs that can show you wat is happening with your server: who is accessing it, what page is the most accessed, what takes longer to show, etc.

    I use awstats myself (just to illustrate):
    LVL 27

    Expert Comment

    djsoltan, to disable logs:

    edit file /usr/local/apache/httpd.conf
    or where is your Apache config located
    find entries with 'domlog' like:
    CustomLog  /usr/local/apache/domlogs/*whatever*
    TransferLog  /usr/local/apache/domlogs/*whatever*

    comment these lines with '#' sign and restart apache 'apachectl restart'
    also you may disable ErrorLog, but I don't recommend to do it.

    Author Comment

    thanks for all the inputs,
    i found this line of code.

    TransferLog "|rotatelogs /path/to/logs/access_log 86400"

    that rotates every 24 hours,
    but, how do i use it?
    can you walk me throw it please?
    p.s if i use this, would i be able to use that aw stats? that looks very good, i took a look at it, and looked very nice.
    LVL 19

    Expert Comment

    just check you have that program in your system

    locate rotatelogs


    find /usr -name 'rotatelogs'

    and then, just enable it.

    awstats requires you to change all your log lines from "default" to be "combined" and then all you need is to download it and a more or less simple configuration.

    Author Comment

    hi redimido, thanks for the quick reply,
    ok, so i do have it
    its under /usr/local/apache/bin/rotatelogs
    now, to enable it, i have to add it to the httpd.conf right? and if so, does it matter where i copy paste the line or not?
    LVL 19

    Accepted Solution

    it sorts of matter. there are sections on httpd.conf, so try to find where the TransferLog is, and then modify it.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
    Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now