vhost multiple error logs

How can I have multiple error logs based on virtual host names?

something like this?

NameVirtualHost *:80

<VirtualHost *:80>
VirtualDocumentRoot /Library/WebServer/Documents/%-3
ErrorLog logs/$HOSTNAME.error_log
</VirtualHost>

I have 11 host names and really only wish to have one VirtualHost section.

Thanks,
Greg


------------------------------------------------------------ ---------
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 [at] httpd.apache.org
" from the digest: users-digest-unsubscribe [at] httpd.apache.org
For additional commands, e-mail: users-help [at] httpd.apache.org
Greg Cole [ Mi, 03 März 2010 02:02 ] [ ID #2033916 ]

Re: vhost multiple error logs

On 02/03/2010 8:02 PM, Greg Cole wrote:
> How can I have multiple error logs based on virtual host names?
>
> something like this?
>
> NameVirtualHost *:80
>
> <VirtualHost *:80>
> VirtualDocumentRoot /Library/WebServer/Documents/%-3
> ErrorLog logs/$HOSTNAME.error_log
> </VirtualHost>
>
> I have 11 host names and really only wish to have one VirtualHost section.
>
> Thanks,
> Greg
>
>
> ------------------------------------------------------------ ---------
> 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 [at] httpd.apache.org
> " from the digest: users-digest-unsubscribe [at] httpd.apache.org
> For additional commands, e-mail: users-help [at] httpd.apache.org
>
>
Greg,

You can, use you use traditional name-based vhosts, yes. Besides, you
don't need VirtualDocumentRoot for 11 vhosts.

Frank.

------------------------------------------------------------ ---------
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 [at] httpd.apache.org
" from the digest: users-digest-unsubscribe [at] httpd.apache.org
For additional commands, e-mail: users-help [at] httpd.apache.org
Frank Gingras [ Mi, 03 März 2010 02:13 ] [ ID #2033917 ]

Re: vhost multiple error logs

> On 02/03/2010 8:02 PM, Greg Cole wrote:
>> How can I have multiple error logs based on virtual host names?
>>
>> something like this?
>>
>> NameVirtualHost *:80
>>
>> <VirtualHost *:80>
>> VirtualDocumentRoot /Library/WebServer/Documents/%-3
>> ErrorLog logs/$HOSTNAME.error_log
>> </VirtualHost>
>>
>> I have 11 host names and really only wish to have one VirtualHost =
section.
>>
>> Thanks,
>> Greg
>>
>>
>> ------------------------------------------------------------ ---------
>> 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 [at] httpd.apache.org
>> " from the digest: users-digest-unsubscribe [at] httpd.apache.org
>> For additional commands, e-mail: users-help [at] httpd.apache.org
>>
>>
On Mar 2, 2010, at 5:13 PM, Frank Gingras wrote:
> Greg,
>
> You can, use you use traditional name-based vhosts, yes. Besides, you =
don't need VirtualDocumentRoot for 11 vhosts.
>
> Frank.
>
> ------------------------------------------------------------ ---------
> 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 [at] httpd.apache.org
> " from the digest: users-digest-unsubscribe [at] httpd.apache.org
> For additional commands, e-mail: users-help [at] httpd.apache.org
>

So how can I get a unique, dynamically named error log for each host? =
Something like www.vhost1.org.error_log, www.vhost2.org.error_log,... =
All the while keeping this in one vhost section.



------------------------------------------------------------ ---------
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 [at] httpd.apache.org
" from the digest: users-digest-unsubscribe [at] httpd.apache.org
For additional commands, e-mail: users-help [at] httpd.apache.org
Greg Cole [ Mi, 03 März 2010 02:52 ] [ ID #2033918 ]

Re: vhost multiple error logs

On Tue, Mar 2, 2010 at 8:52 PM, Greg Cole <gcole [at] uoregon.edu> wrote:

>
> So how can I get a unique, dynamically named error log for each host? Something like www.vhost1.org.error_log, www.vhost2.org.error_log,... All the while keeping this in one vhost section.

You can't, because apache opens logfiles at startup not as requests arrive.

You can use something like mod_macro if you don't want to type out
your vhosts, or you can log the vhost name and split your logfiles
offline.


--
Eric Covener
covener [at] gmail.com

------------------------------------------------------------ ---------
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 [at] httpd.apache.org
" from the digest: users-digest-unsubscribe [at] httpd.apache.org
For additional commands, e-mail: users-help [at] httpd.apache.org
Eric Covener [ Mi, 03 März 2010 02:59 ] [ ID #2033919 ]
Webserver » gmane.comp.apache.user » vhost multiple error logs

Vorheriges Thema: Spider Monkey
Nächstes Thema: Can I have 2 httpd servers running on 2 different ports?