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!

Check Apache and FTP logs for specific date

Discussion in 'EasyApache' started by nana_coinwale, Apr 2, 2010.

  1. nana_coinwale

    nana_coinwale Member

    Nov 15, 2006
    Likes Received:
    Trophy Points:
    Is there any way we can check apache and FTP logs for specific date?

    I tried,

    grep "Mar 25" /usr/local/apache/logs/error_log | grep domain name

    grep "Thu Mar 25" /usr/local/apache/logs/error_log | grep domain name

    with no luck. Please assist me if any one knows a proper way.

    Thank you in advance :)
  2. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Nov 5, 2008
    Likes Received:
    Trophy Points:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    For FTP logs, check the system messages log, typically at the following path:
    The following command will also attempt to search rotated copies of the system messages log while allowing for compression in either gzip or bzip2:
    # zgrep -Hin "example" /var/log/messages*
    # bzgrep -Hin "example" /var/log/messages*
    Errors logged by Apache will be found in the same path that you noted:
    Potentially related details may be logged in other files, such as from the Apache modules suEXEC or suPHP:
    # grep -Hin "example" /usr/local/apache/logs/*log
    With regard to the Apache error_log, it can be difficult to track down older messages because the domain name may not be explicitly logged; however, you may also try searching by the cPanel account username, as this is sometimes referenced in an error even if the domain name is not mentioned.

    Please note that there may be a different date and time format used in different log files, so you would need to briefly examine each log file to ascertain the unique date and time format needed when using grep. A text viewer such as "less" or "more" or editors such as vi/vim or nano/pico may be used to view a file; here are a few examples to open a file in read-only mode:
    # less /path/to/file
    # vim -R /path/to/file
    # nano -v /path/to/file
    To have line numbers and syntax-highlighting, I suggest the following example using "vim" (to view a file such as the system messages log):
    # vim -c "set number" -R /var/log/messages
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

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