Error logs

Discussion in 'Linux VPS/Dedicated - cPanel' started by Dandello, Sep 23, 2010.

  1. Dandello

    Dandello New Member

    I run Apache with Activestate Perl on my home machine for test and development.In that set up (the default one) Apache just keeps adding to the log until I empty it out.

    So in WHM, how do I increase the size of the error logs - when scanning 20000 generated URLs 300 lines doesn't cut it.

    On a related note - my error logs keep referring to a 500.shtml file that was missing. It was being referred by every page and script (It wasn't referring to a 500 error and I've never seen that one on my home logs) Has anyone else seen this?

    To get rid of it I just made a file name 500.shtml but it would be nice to know where this is being called from. :confused:
  2. Dandello

    Dandello New Member

    Okay - the 500.shtml appear to actually referred from pages with 500 errors - even though those pages aren't throwing any visible errors. A 504.shtml was being called from a page that had timeout issues - it's a pretty big page.

    Weird. So, on a related note, what Perl or Apache modules do I have to load so my error logs tell be something helpful concerning Perl errors.
  3. dkap

    dkap New Member

    I'm curious about all of the above, too. This thread is two years old, but it still appears relevant. On all the previous servers I've hosted with, there has been either an overall error log or one per directory, and they would just keep filling up until emptied. I can't find anything similar in the KH setup.

    As for the 500.shtml not found errors, I'm getting those for 404.shtml even though the .htaccess file has a redirect from 404.shtml to 404.php.

    Redirect permanent /404.shtml
    ErrorDocument 404 /404.php

  4. Dan

    Dan Moderator

    Hi Dan,

    It sounds like you're asking where the error logs are:
    The Apache error log can be found at /usr/local/apache/logs/error_log.
    The raw domain error logs can be found at /usr/local/apache/domlogs and they are also in each individual domain's cPanel.

    I don't remember cPanel/WHM's default configuration but I personally see to it that the main error log is rolled over weekly and I keep 4 weeks of them.

    As near as I can tell this is an error somewhere in cPanel's Apache. If you look in your Apache config file (/usr/local/apache/conf/httpd.conf) you'll find a line like this
    Include "/usr/local/apache/conf/includes/errordocument.conf"
    and it's that errordocument.conf that tries to call the *.shtml files. Personally I just delete the include from the httpd.conf which gets rid of all of the errors in the log but if you go this route you'll need to remember to do it after every Apache update.
  5. dkap

    dkap New Member

    Thanks for the info.

    Yes, that's more or less what I was looking for, but on a domain-by-domain basis. The overall /logs/error_log is better than nothing (it didn't contain any entries for the problem I was troubleshooting), but being for all the domains, it's much too large to be of much use.

    The /apache/domlogs files appear to be raw access logs, not error logs... Am I missing something there? All I could find in cPanel is the last 300 entries, as listed as a problem in the first post in this thread, which is all errordocument.conf redirects.

    I'm not sure I'm comfortable deleting that include... Wouldn't that mean every domain on the account would need its own error handling? Seems better to either modify errordocument.conf (easy enough) or put dummy 404.shtml/500.shtml files on the server for each. Modifying the file would require each domain to use the same file type, though, such as 404.php.


Share This Page