Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I can't seem to find the error log for apache on my locahost on Ubuntu. I have apache2 installed.

I'm using this command to follow the errors tail -f /var/log/apache2/error.log but somehow this log is not logging all my errors?

Is this the correct file?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

Check your httpd.conf to see if you have the following line or something very similiar:

ErrorLog "logs/error.log"

It might be in a different directory, or it might be called something else, but if you don't have a line in the Apache configuration file starting with ErrorLog, you're probably not catching the errors.

If that's good, double-check to make sure you haven't got the LogLevel commented out:

# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warn

The default setting is warn, which is about on the edge of way too much info and waiting for a more serious fault in the localhost. If it's commented out, with a hash (#) starting the line, you also won't be catching any errors in the log file despite the ErrorLog setting.

You can compare what each level setting of LogLevel is in the Apache server documentation.

share|improve this answer
    
It seems like I'm in the correct file but I noticed something else. In the httpd.conf file I noticed the following # # LogLevel: Control the number of messages logged to the error_log. # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. # LogLevel warn Could this have something to do with the strictness of the errors? –  Roland Aug 20 '09 at 11:34
    
That would be correct, and if commented out, will mean you're not catching any of the errors. –  random Aug 20 '09 at 11:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.