You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by anthony G <sc...@gmail.com> on 2005/06/30 01:31:22 UTC

[users@httpd] Seperating Logs with mass virtual hosting

I'am running 

Win 2003
Apache 2.0.53

I'am pulling my virtual hosts from a vhost.map file. My Virtual Host
configuration within httpd.conf looks like this.

RewriteEngine on
RewriteMap lowercase int:tolower
RewriteMap vhost txt:E:\apache\Apache2\conf\vhost.map
RewriteCond   %{HTTP_HOST}     ^(www\.)?([^.]+\.com)$ 
RewriteCond   ${lowercase:%2}  ^(.+)$
RewriteCond   ${vhost:%1} ^(/.*)$
RewriteRule   ^/(.*)$   %1/$1 
LogFormat "%V %{TYPE}e %h %l %u %t \"%r\" %>s %b" vhostspecial
CustomLog  "e:/webspace/logs/vhost.log" vhostspecial

Is there a way to split the main vhost.log into not only seperate
files but seperate directories based on the virtual host name?

I have tried using the apache split-logfile.in and it just splits the
log into seperate logfiles based on the domain name, not directories.

When I run split-logfile.in it also gives me a seperate log file for
domain.com and www.domain.com.  Is there a way for those to be
combined?

Thanks,
Anthony - scar911@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@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] Seperating Logs with mass virtual hosting

Posted by Joshua Slive <js...@gmail.com>.
On 6/29/05, anthony G <sc...@gmail.com> wrote:
> Is there a way to split the main vhost.log into not only seperate
> files but seperate directories based on the virtual host name?
> 
> I have tried using the apache split-logfile.in and it just splits the
> log into seperate logfiles based on the domain name, not directories.
> 
> When I run split-logfile.in it also gives me a seperate log file for
> domain.com and www.domain.com.  Is there a way for those to be
> combined?

split-logfile is just a simple perl script.  You can modify it to do
whatever splitting you want.  Or do the same in any other language.

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