# error_log per Virtual Host?

On one Linux Server running Apache and also PHP 5, we have numerous Virtual Hosts with different log documents. We can not appear to divide the php error_log in between digital hosts.

Bypassing this setup in the <Location> of the httpd.conf does not appear to do anything.

Exists a means to have different php error_logs for each and every Virtual Host?

0
2019-05-06 23:54:40
Source Share

My Apache had something similar to this in httpd.conf. Simply transform the ErrorLog and also CustomLog setups

<VirtualHost myvhost:80>
DocumentRoot /opt/web
ServerName myvhost
ErrorLog logs/myvhost-error_log
CustomLog logs/myvhost-access_log common
</VirtualHost>

0
2019-05-21 11:28:51
Source

The default practices is for error_log ( ) to result to the Apache mistake log. If this isn't taking place examine your php.ini setups for the error_log instruction - leave it unset to make use of the Apache log apply for the existing vhost.

0
2019-05-07 17:49:48
Source

To set the Apache ( not the PHP ) log, the most convenient means to do this would certainly be to do :

<VirtualHost IP:Port>
# Stuff,
# More Stuff,
ErrorLog /path/where/you/want/the/error.log
</VirtualHost>


If there is no leading "/" it is thought to be loved one.

0
2019-05-07 17:18:24
Source

I generally simply define this in an .htaccess documents or the vhost.conf on the domain name I'm working with. Add this to among these documents :

php_admin_value error_log "/var/www/vhosts/example.com/error_log"

0
2019-05-07 16:56:59
Source