0

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.

MatteoSp
  • 2,940
  • 5
  • 28
  • 36

1 Answers1

2

Found by my self, there a note on apache docs (http://httpd.apache.org/docs/current/mod/core.html#errorlog) saying:

The facility is effectively global, and if it is changed in individual virtual hosts, the final facility specified affects the entire server.

sadly.

MatteoSp
  • 2,940
  • 5
  • 28
  • 36