[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cobalt-users] logging >> RaQ3i's



Hey All,

Recently I had to add some "CustomLog" and "RewriteCond" directives to one of me
VirtualHost sites
in httpd.conf.   Unfortunately as I found out later on, these lines had the
effect of overiding the logging setup which is
in effect for every other VirtualHost, logging to /home/log/httpd/access.  So in
essence, my stats disappeared for
this site after I installed these directives.  (my stats are all read from
"access" under /home/log/httpd)

I am wondering how and where I can add a new line or two to get this site to
still output to the same old
access log as before, >and< not interfere with the new pennywize directives I
had to add?  Can you have the same access log
lines append to two different logs at the same time?

Cobalt's implimentation of logging has seemed pretty week to me -- from my
beginner's perspective anyways.   Why not
log to seperate files for each site?  I ask this because with just four or so
sites on my server, logging all month, I get an access log
in the range of 1.5G to 2.0Gig or even more.   This can be a majorly unweildy
file to work with or grep through, or have a stats
package crunch through, or backup for safeckeeping....

I'm wondering if I can safely add CustomLog or TransferLog directives to >all<
my VirtualHost sections such that they each
generate their own access log?  Any thoughts on this all?  What is the
difference also between CustomLog and Transferlog directives?

Below is VirtualHost section for the site mentioned above (domain removed for
pricacy of client):

NameVirtualHost 64.38.210.245
<VirtualHost 64.38.210.245>
ServerName www.domain-example.com
ServerAdmin admin
DocumentRoot /home/sites/site4/web
RewriteEngine on
RewriteCond %{HTTP_HOST}                !^64.38.210.245(:80)?$
RewriteCond %{HTTP_HOST}                !^www.domain-example.com(:80)?$
RewriteRule ^/(.*)                      http://www.domain-example.com/$1 [L,R]
RewriteOptions inherit
AliasMatch ^/~([^/]+)(/(.*))? /home/sites/site4/users/$1/web/$3
AliasMatch ^/users/([^/]+)(/(.*))? /home/sites/site4/users/$1/web/$3
AddHandler cgi-wrapper .cgi
AddHandler cgi-wrapper .pl
CustomLog "| /home/sites/site4/web/cgi-dir/pennywize.cgi" "%h|%u|%s|CPT"
RewriteCond /home/sites/site4/web/cgi-dir/pennywize/CPT/%{LA-U:REMOTE_USER} -f
[OR]
RewriteCond /home/sites/site4/web/cgi-dir/pennywize/CPT/%{REMOTE_ADDR} -f
RewriteRule ^/site_members.*$ http://www.domain-example.com/join/ [L,R]
</VirtualHost>


Thanks much for any clarifications anyone can offer me!,

~ Theo