Mail your problems to us on lawania@lavania.in, we will solve it and put the solution here at Lawania.com

Where are the Apache and PHP log files?

Where are the Apache and PHP log files?


By default, /var/log/apache2/error.log.

This can be configured in /etc/php5/apache2/php.ini.



You can also define a specific error log file for each VirtualHost in Apache. If you have any VirtualHost defined in /etc/apache2/sites-available/ and enabled in /etc/apache2/sites-enabled (enable with sudo a2ensite [your-virtualhost-definition-file]), you can change the error log by adding the following line inside your VirtualHost config:

ErrorLog ${APACHE_LOG_DIR}/[your-vhost]-error.log
That might be useful if you have a lot of vhosts and want to split where they report the errors.
Also, you can watch your error log live by issuing the following command (adapt to your own log file if different from the default):

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

This is particularly useful when doing live debugging.

Share on Google Plus

About Prof. Krishan Kant Lavania

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment