error_log per Virtual Host?

If somebody comes looking it should look like this:

<VirtualHost *:80>
    ServerName example.com
    DocumentRoot /var/www/domains/example.com/html
    ErrorLog /var/www/domains/example.com/apache.error.log
    CustomLog /var/www/domains/example.com/apache.access.log common
    php_flag log_errors on
    php_flag display_errors on
    php_value error_reporting 2147483647
    php_value error_log /var/www/domains/example.com/php.error.log
</VirtualHost>

This is for development only since display_error is turned on. You will notice that the Apache error log is separate from the PHP error log. The good stuff is in php.error.log.

Take a look here for the error_reporting key http://www.php.net/manual/en/errorfunc.configuration.php#ini.error-reporting

Leave a Comment