Okay. I have this in my .htaccess:
# enable PHP error logging
php_flag log_errors on
php_value error_log logs/php_errors.log
# enable PHP error logging
php_flag log_errors on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{HTTP_HOST} !^www
RewriteCond %{HTTP_HOST} ^([^\.]+)\.([^\.]+)\.([^\.]+)$
php_value error_log logs/php_errors_$1.log
This is a little work around:
.htaccess:
php_value auto_prepend_file "/home/path/public_html/domain/setLogFile.php"
setLogFile.php:
<?php
// Get subdomain
$subdomain = array_shift((explode(".",$_SERVER['HTTP_HOST'])));
// Set log file
ini_set("log_errors", 1);
ini_set("error_log", "/home/path/public_html/domain/logs/php_errors_" . $subdomain);
?>