You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by James Corteciano <ja...@linux-source.org> on 2010/06/05 18:11:26 UTC

Re: [users@httpd] httpd vhost centralized logging

Hi Jonas,

Thanks for your response. What is your configuration for ErrorLog on all
vhost?

Regards,
James

On Fri, May 28, 2010 at 10:57 PM, Jonas Eckerman <jo...@frukt.org>wrote:

> On 2010-05-24 11:16, James Corteciano wrote:
>
>  I'm thinking to use logger tool for every httpd services running but
>> it's not an ideal because it takes more resources in server. Let say
>> there are 50 vhost in a server, then 100 logger apps will be running
>> because 2 logger per vhost (ErrorLog & CustomLog).
>>
>
> Separate loggers for each main HTTP server is not the same as separate
> loggers for each *virtual* host.
>
> Set up the logging in the main httpd config and you can have all vhosts use
> the same logger instance(s).
>
> I currently have this in a reverse proxy with 65 vhosts:
>
> CustomLog "|/usr/bin/logger -h 10.0.7.12 -t httpd -p local4.notice"
> vhostcombinedsyslog
> CustomLog "|/usr/bin/logger -h 10.0.7.12 -t httpd -p local4.notice"
> vhostnumsyslognc
>
> Those two lines results in a total of two logger apps running.
>
> Regards
> /Jonas
> --
> Jonas Eckerman
> Fruktträdet & Förbundet Sveriges Dövblinda
> http://www.fsdb.org/
> http://www.frukt.org/
> http://whatever.frukt.org/
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>  "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Re: [users@httpd] httpd vhost centralized logging

Posted by Jonas Eckerman <jo...@frukt.org>.
On 2010-06-05 18:11, James Corteciano wrote:

> Thanks for your response. What is your configuration for ErrorLog on all
> vhost?

For one single error log to wich all vhosts log, just place the ErrorLog 
directive in the server config scope (outside of any VirtualHost container).

For multiple error logs, one for each vhost, place ErrorLog directives 
in virtual host scope (inside VirtualHost containers).

The same goes for RewriteLog, ScriptLog, TransferLog and CustomLog.

Regards
/Jonas

-- 
Jonas Eckerman
Fruktträdet & Förbundet Sveriges Dövblinda
http://www.fsdb.org/
http://www.frukt.org/
http://whatever.frukt.org/

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org