Working on CentOS (specifically the Amazon EC2 Linux AMI). I have 2 virtual host on my apache, and I would like them to log on different rsyslog facilities, so I configured my hosts like this:
<VirtualHost *:80>
DocumentRoot /var/www/site1
ServerName www.site1.com
ServerAlias alias1
ErrorLog syslog:local1
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /var/www/site3
ServerName www.site3.com
ServerAlias alias3
ErrorLog syslog:local3
</VirtualHost>
and in my rsyslog conf I set up 2 forwarding rules:
local1.* /logFile1
local3.* /logFile3
But everything goes into logFile1, as if the 2 virtualhost were sharing the syslog facilities. I can't understand what's happening.