Subj : Re: Web log(s)
To : Runemaster
From : Deuce
Date : Thu Apr 21 2005 08:43 am
Re: Re: Web log(s)
By: Runemaster to Deuce on Thu Apr 21 2005 09:18:00
> Would you mind terribly sending me your conf file to peruse? I like what yo
> have done :)
Cron Job:
# Generate usage reports for web sites.
0 1 * * * /usr/bbs/sbbs/exec/webalog.pl
webalog.pl file:
#!/usr/bin/perl
my @yest=localtime(time-86400); # Yesterday
my $yeststr=sprintf("%04d-%02d-%02d",$yest[5]+1900,$yest[4]+1,$yest[3]);
my $glob="/usr/bbs/sbbs/data/logs/http-*$yeststr.log";
my @files=glob($glob);
foreach my $file (@files) {
if($file =~ /http-(.*)-$yeststr.log$/) {
my $host=$1;
if (! -d "/usr/bbs/sbbs/web/html/logs.bbsdev.net/$host") {
print "Making new dir for $host\n";
mkdir("/usr/bbs/sbbs/web/html/logs.bbsdev.net/$host",0755);
open(INDEX, ">> /usr/bbs/sbbs/web/html/logs.bbsdev.net/index.html")
;
print INDEX "$host
\n";
close INDEX;
}
system("/usr/local/bin/webalizer","-q","-p","-n",$host,"-o","/usr/bbs/s
bbs/web/html/logs.bbsdev.net/$host",$file);
unlink($file);
}
else {
}
}
I don't delibe I have a webalizer.conf.
I DO think I have host lookups wnabled for the web server.
Me [Web] section:
[Web]
AutoStart=true
Interface=
Port=2327
RootDirectory=../web/html
ErrorDirectory=/usr/bbs/sbbs/web/html/errors
IndexFileNames=index.html,index.ssjs,index.cgi
CGIExtensions=.cgi
JavaScriptExtension=.ssjs
MaxInactivity=120
MaxCgiInactivity=120
LogFile=../data/httpd-
Options=GET_IDENT | VIRTUAL_HOSTS | DEBUG_RX | DEBUG_TX | HTTP_LOGGING
---
þ Synchronet þ ``Penguins make tasty snacks''
.