Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Member nana_coinwale's Avatar
    Join Date
    Nov 2006
    Posts
    11

    Question Check Apache and FTP logs for specific date

    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. #2
    cPanel Quality Assurance Analyst cPanelDon's Avatar
    Join Date
    Nov 2008
    Location
    Houston, Texas, U.S.A.
    Posts
    2,555
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default

    Quote Originally Posted by nana_coinwale View Post
    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
    For FTP logs, check the system messages log, typically at the following path:
    Code:
    /var/log/messages
    The following command will also attempt to search rotated copies of the system messages log while allowing for compression in either gzip or bzip2:
    Code:
    # 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:
    Code:
    /usr/local/apache/logs/error_log
    Potentially related details may be logged in other files, such as from the Apache modules suEXEC or suPHP:
    Code:
    # 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:
    Code:
    # 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):
    Code:
    # vim -c "set number" -R /var/log/messages

Similar Threads & Tags
Similar threads

  1. Logs To Find IP That Checks Specific POP Account
    By orty in forum E-mail Discussions
    Replies: 6
    Last Post: 12-18-2010, 01:47 AM
  2. Add system Date/Time to cPhulkd logs
    By yayyo in forum Feature Requests for cPanel/WHM
    Replies: 0
    Last Post: 03-14-2010, 10:59 PM
  3. Logs for specific date
    By thewebhosting in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 10-22-2009, 07:59 PM
  4. Apache and FTP logs
    By split in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 05-30-2006, 03:04 AM
  5. Disable logs for a specific domain name?
    By erick_paper in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 02-11-2006, 04:34 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube