httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ren, Lingyun" <lr...@utk.edu>
Subject RE: [users@httpd] split the error_log for each virtual host in Apache 2.2
Date Thu, 20 Mar 2014 13:52:56 GMT
Dear Bowen,

Thank you very much.

Lingyun
________________________________________
From: Rich Bowen <rbowen@rcbowen.com>
Sent: Wednesday, March 19, 2014 2:52 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] split the error_log for each virtual host in Apache 2.2

On 03/19/2014 02:26 PM, Ren, Lingyun wrote:
>
> Hi,
>
>
> I am trying to implement the dynamic virtual host with Rewrite in
> Apache 2.2. The codes are shown bellow,
>
>
> <VirtualHost *:80>
> RewriteEngine on
> RewriteCond %{HTTP_HOST} ^(.+)\.domain\.com$ [NC]
> RewriteRule ^(.*) /home/%1/public_html$1
> # record all error_log entries for virtual hosts
> ErrorLog logs/cust-logs/vh_error_log
> </VirtualHost>
>
> One requirement is to create error_log for each virtual host. Is there
> any way to split this vh_error_log for each virtual host?
> Or is there any good way to create the error_log for each virtual host?

With 2.2, no. With 2.4, you could create a custom log file format which
contained the hostname, and then post-process to split it up, or log to
a pipe to give you live splitting if that's needed.


--
Rich Bowen - rbowen@rcbowen.com - @rbowen
http://apachecon.com/ - @apachecon


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message