Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I get log messages from the LAMP server on Ubuntu 10.04? Should I install some good program on Ubuntu for that purpose?

share|improve this question
up vote 5 down vote accepted

Using cat is not a good idea, especially if logs grow large. Instead, try tailing.

sudo tail /var/log/apache2/error.log

tail will only show the last N lines of a file. If you want to keep monitoring the last lines, use the -F command-line option . Use Ctrl + C to close the monitoring.

sudo tail -F /var/log/apache2/error.log

To enable the logging, you must do that in the php.ini (look for error-logging). AFAIK that is no longer on by default in Ubuntu 10.04.

share|improve this answer

If you have to watch multiple files I'd suggest multitail. It lets you divide the screen and watch multiple files:

multitail in GNOME terminal

share|improve this answer

By default, the display of error messages is disabled in Lamp with Ubuntu 10.04 (I think it was enabled before...). You can read it with the following command :

sudo cat /var/log/apache2/error_log


sudo cat /var/log/apache2/access_log

I don't know how to re-enable the display of error messages, but it was really useful.

share|improve this answer
they are empty, what I should do to enable them? My main problem that I get 500 error on my server when I going to some page. – Yosef Jun 2 '10 at 12:38
error.log and access.log – Yosef Jun 2 '10 at 19:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .