Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Tail log files

Discussion in 'General Discussion' started by NightStorm, May 8, 2006.

  1. NightStorm

    NightStorm Well-Known Member

    Jul 28, 2003
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    A program that I am working with needs to be able to tail -f the Apache log files on the fly for all my domains.
    tail -f /usr/local/apache/domlogs/* won't work though, because CPanel is putting all the other logs in that folder as well, which I don't want... only the main domain http log.
    Anyone got an idea on how I can sort this out to only parse the proper logs while skipping over the extra crap in there, like the <domain>-bytes_log and <domain>-bytes_log.offset and <domain>-smtpbytes_log files?
  2. RickG

    RickG Well-Known Member

    Feb 28, 2005
    Likes Received:
    Trophy Points:
    North Carolina
    Take a look at the CustomLog directive under each of the VirtualHost containers in /usr/local/apache/conf/httpd.conf

    By default, the value is:
    CustomLog domlogs/ combined

    One option would be to change the existing directive to something like:
    CustomLog domlogs/ combined

    Or ... add an additional CustomLog directive to each VirtualHost container pointing and naming the secondary log to whatever you want. If you do this, just keep a watch on resources etc.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice