You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Gary W. Smith" <ga...@primeexalia.com> on 2008/02/10 20:30:28 UTC

[users@httpd] Split logs based upon VirtualDocumentRoot

Hello,
 
We use the following for hosting several sites by domain name and it seems to work well for us.
 
VirtualDocumentRoot /exports/home/%-2.0.%-1/virtualdomains/%0
 
What we would like to do is to split the incoming logs for each of the base level domains (that is domain.tld, regardless of *.domain.tld) such that for each domain the logs are stored in /exports/home/%-2.0/%-1/logs.  In this case, the log folders (and the /exports/home/%-2.0/%-1/) are owned by root, so this shouldn't be too much of a security issue.
 
Is there a way do this with the logs without doing actual virtuals for each site?
 
Gary Wayne Smith
 


 
 

RE: [users@httpd] Split logs based upon VirtualDocumentRoot

Posted by "Gary W. Smith" <ga...@primeexalia.com>.
Joshua, 
 
We had already looked into that route.  We are just trying to work around configuring a virtual for each domain.  I know there are a few other aproaches to it as well (such as pipe or splitting the file).  I guess I'll just play around for a while with some of the log splitting samples and see if that does what we want.
 
Gary Wayne Smith

________________________________

From: jslive@gmail.com on behalf of Joshua Slive
Sent: Sun 2/10/2008 1:18 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Split logs based upon VirtualDocumentRoot



On Feb 10, 2008 2:30 PM, Gary W. Smith <ga...@primeexalia.com> wrote:
>
>
> Hello,
>
> We use the following for hosting several sites by domain name and it seems
> to work well for us.
>
> VirtualDocumentRoot /exports/home/%-2.0.%-1/virtualdomains/%0
>
> What we would like to do is to split the incoming logs for each of the base
> level domains (that is domain.tld, regardless of *.domain.tld) such that for
> each domain the logs are stored in /exports/home/%-2.0/%-1/logs.  In this
> case, the log folders (and the /exports/home/%-2.0/%-1/) are owned by root,
> so this shouldn't be too much of a security issue.
>
> Is there a way do this with the logs without doing actual virtuals for each
> site?

The solution is discussed here:
http://httpd.apache.org/docs/2.2/logs.html#virtualhost

Joshua.

---------------------------------------------------------------------
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] Split logs based upon VirtualDocumentRoot

Posted by Travis Sidelinger <tr...@ilive4code.net>.
In our environment we stream all the Apache logs to a central syslog 
server.  I recently wrote a program in perl to auto separate the logs 
per application name.  Here is the program I wrote if you are 
interested:  http://www.ilive4unix.net/doku.php/code/perl/logsplitter.pl

Travis Sidelinger

Joshua Slive wrote:
> On Feb 10, 2008 2:30 PM, Gary W. Smith <ga...@primeexalia.com> wrote:
>   
>> Hello,
>>
>> We use the following for hosting several sites by domain name and it seems
>> to work well for us.
>>
>> VirtualDocumentRoot /exports/home/%-2.0.%-1/virtualdomains/%0
>>
>> What we would like to do is to split the incoming logs for each of the base
>> level domains (that is domain.tld, regardless of *.domain.tld) such that for
>> each domain the logs are stored in /exports/home/%-2.0/%-1/logs.  In this
>> case, the log folders (and the /exports/home/%-2.0/%-1/) are owned by root,
>> so this shouldn't be too much of a security issue.
>>
>> Is there a way do this with the logs without doing actual virtuals for each
>> site?
>>     
>
> The solution is discussed here:
> http://httpd.apache.org/docs/2.2/logs.html#virtualhost
>
> Joshua.
>
> ---------------------------------------------------------------------
> 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
>
>
>   


---------------------------------------------------------------------
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] Split logs based upon VirtualDocumentRoot

Posted by Joshua Slive <jo...@slive.ca>.
On Feb 10, 2008 2:30 PM, Gary W. Smith <ga...@primeexalia.com> wrote:
>
>
> Hello,
>
> We use the following for hosting several sites by domain name and it seems
> to work well for us.
>
> VirtualDocumentRoot /exports/home/%-2.0.%-1/virtualdomains/%0
>
> What we would like to do is to split the incoming logs for each of the base
> level domains (that is domain.tld, regardless of *.domain.tld) such that for
> each domain the logs are stored in /exports/home/%-2.0/%-1/logs.  In this
> case, the log folders (and the /exports/home/%-2.0/%-1/) are owned by root,
> so this shouldn't be too much of a security issue.
>
> Is there a way do this with the logs without doing actual virtuals for each
> site?

The solution is discussed here:
http://httpd.apache.org/docs/2.2/logs.html#virtualhost

Joshua.

---------------------------------------------------------------------
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