Awstats ?

Discussions around the use of Apache on VMS
Post Reply
User avatar
Arvid Elstrodt
$ HELP
Posts: 15
Joined: Tue Jan 10, 2006 7:19 pm
Location: Amersfoort, The Netherlands
Contact:

Awstats ?

Post by Arvid Elstrodt »

Hi,

Does any of you know awstats, and has tried it on OpenVMS ?
On my -former- Linux box, I was running awstats and I liked it very much.

While searching the Internet, I came across some threads from 2004 on other BB's, but a lot of time has passed since then ....


http://www.awstats.org/
User avatar
issinoho
Site Admin
Posts: 241
Joined: Tue Feb 01, 2005 12:53 am
Location: Scotland
Contact:

Post by issinoho »

To my knowledge nobody has ported this to VMS. From memory it is Perl based so there is no reason for it not to work.
User avatar
operagost
Posts: 2
Joined: Tue Jan 31, 2006 3:04 pm

Post by operagost »

Yet, it does not. I know I have the Compaq PERL packages installed correctly because perl_rules works, but Awstats just logs messages like this:

Code: Select all

&#91;Tue Jan 31 10&#58;05&#58;20 2006&#93; &#91;error&#93; <none>=HASH&#40;0x2978524&#41;
The hex code is different each time.

It's a shame because I had this running great on Windows, and now I'll have to break my addiction to statistics. :(
User avatar
issinoho
Site Admin
Posts: 241
Joined: Tue Feb 01, 2005 12:53 am
Location: Scotland
Contact:

Post by issinoho »

Well Webalizer & Analog both work so you don't have to go completely cold turkey!
User avatar
WillemGrooters
VMS Guru
Posts: 59
Joined: Wed Jul 20, 2005 10:17 am
Location: Netherlands
Contact:

Beware, however

Post by WillemGrooters »

I don't now awstats itself but I do know it's one of those scripts that is accessed for abuse :evil: . Before installing it, check your ERROR_LOG. file, I found attamts to run it quite often (Look in sysmgr.blogspot.com, entry of 24-Jan-2006 (compiled from a 6-months log) :D ). I have seem similar attempts in last week's log as well
If you install it on a non-default location, it might help
(BTW: What does it do/what should it show?)
User avatar
issinoho
Site Admin
Posts: 241
Joined: Tue Feb 01, 2005 12:53 am
Location: Scotland
Contact:

How to make it work...

Post by issinoho »

Procedure for getting Awstats running on OpenVMS (compliments to Carl Karcher for his post on cov).

Download & install Perl 5.8-6 & CSWS_PERL 2.1 from HP

Download Awstats

Unzip,
$ jar xvf /awstats-6.5.zip

Modify your apache$root:[conf]httpd.conf, changing the following directive:
from
CustomLog /yourlogpath/yourlogfile common
to
CustomLog /yourlogpath/yourlogfile combined

Add the following directives,

#
# Directives to add to your Apache conf file to allow use of AWStats as a CGI.
#
Alias /awstatsclasses "/webroot/awstats/wwwroot/classes/"
Alias /awstatscss "/webroot/awstats/wwwroot/css/"
Alias /awstatsicons "/webroot/awstats/wwwroot/icon/"
ScriptAlias /awstats/ "/webroot/awstats/wwwroot/cgi-bin/"
#
# This is to permit URL access to scripts/files in AWStats directory.
#
<Directory>
Options None
AllowOverride None
Order allow,deny
Allow from all
</Directory>


Configure Awstats,

$ set def webroot:[awstats.wwwroot.cgi-bin]
$ copy awstats^.model.conf awstats^.vamp.conf
$ edit awstats^.vamp.conf


- Verify the LogFile value. It should be the full path of your server log file, apache$specific:[logs]access.log
- Verify the LogType value. It should be "W" for analyzing web log files.
- Check if LogFormat is set to "4"
- Set the SiteDomain parameter to the main domain name or the intranet web server name used to reach the web site to analyze (Example: www.mysite.com). If you have several possible names for same site, use the main domain name and add the others to the list in the HostAlias parameter.


Build statistics database,

$ perl awstats.pl -config=vamp -update

*** this takes a while ***

Build static pages,

$ pipe perl awstats.pl -config=vamp -output=alldomains -staticlinks > awstats.vamp.alldomains.html
$ pipe perl awstats.pl -config=vamp -output=allhosts -staticlinks > awstats.vamp.allhosts.html
$ pipe perl awstats.pl -config=vamp -output=lasthosts -staticlinks > awstats.vamp.lasthosts.html
$ pipe perl awstats.pl -config=vamp -output=unknownip -staticlinks > awstats.vamp.unknownip.html
$ pipe perl awstats.pl -config=vamp -output=alllogins -staticlinks > awstats.vamp.alllogins.html
$ pipe perl awstats.pl -config=vamp -output=lastlogins -staticlinks > awstats.vamp.lastlogins.html
$ pipe perl awstats.pl -config=vamp -output=allrobots -staticlinks > awstats.vamp.allrobots.html
$ pipe perl awstats.pl -config=vamp -output=lastrobots -staticlinks > awstats.vamp.lastrobots.html
$ pipe perl awstats.pl -config=vamp -output=urldetail -staticlinks > awstats.vamp.urldetail.html
$ pipe perl awstats.pl -config=vamp -output=urlentry -staticlinks > awstats.vamp.urlentry.html
$ pipe perl awstats.pl -config=vamp -output=urlexit -staticlinks > awstats.vamp.urlexit.html
$ pipe perl awstats.pl -config=vamp -output=browserdetail -staticlinks > awstats.vamp.browserdetail.html
$ pipe perl awstats.pl -config=vamp -output=osdetail -staticlinks > awstats.vamp.osdetail.html
$ pipe perl awstats.pl -config=vamp -output=unknownbrowser -staticlinks > awstats.vamp.unknownbrowser.html
$ pipe perl awstats.pl -config=vamp -output=unknownos -staticlinks > awstats.vamp.unknownos.html
$ pipe perl awstats.pl -config=vamp -output=refererse -staticlinks > awstats.vamp.refererse.html
$ pipe perl awstats.pl -config=vamp -output=refererpages -staticlinks > awstats.vamp.refererpages.html
$ pipe perl awstats.pl -config=vamp -output=keyphrases -staticlinks > awstats.vamp.keyphrases.html
$ pipe perl awstats.pl -config=vamp -output=keywords -staticlinks > awstats.vamp.keywords.html
$ pipe perl awstats.pl -config=vamp -output=errors404 -staticlinks > awstats.vamp.errors404.html


Configure Apache to run Perl script,
$ edit apache$root:[conf]mod_perl.conf

Add the following just before the </IfModule> directive at the end of the file,
#
# Let any file with a .pl extension execute under ModPerl::PerlRun.
# PerlRun is one of the several modperl 'handlers' to compile and run
# perl scripts in a non-shared environment on the fly.
#
<files>
sethandler perl-script
PerlHandler ModPerl::PerlRun
PerlSendHeader On
Options ExecCGI
</files>


Modify awstats.pl.
Add the following 2 lines to the start of the file,

use constant IS_MODPERL => $ENV{MOD_PERL};
*CORE::GLOBAL::exit = IS_MODPERL ? sub {goto Return_NOT_exit} : sub {
CORE::exit };


and the following 2 to the end,

Return_NOT_exit:
return;
Post Reply