Posted on

PHP Error Logging for Virtual Hosts

Error logging options for php can be done directly in the virtual hosts configuration file. Therefore you simply define which virtual host is using what kind of php logging.

Here an example:

<VirtualHost *:8080>
    DocumentRoot /var/www/html/example/docs
# add the php logging entries per virtual host
        php_value display_errors 0
        php_value log_errors 1
        php_value error_log /var/log/php/example_error.log
# [...]