error_log per Virtual Host?

后端 未结 11 1913
独厮守ぢ
独厮守ぢ 2020-12-02 07:58

On one Linux Server running Apache and PHP 5, we have multiple Virtual Hosts with separate log files. We cannot seem to separate the php error_log between virtu

11条回答
  •  鱼传尺愫
    2020-12-02 08:12

    If somebody comes looking it should look like this:

    
        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
    
    

    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

提交回复
热议问题