Processing EZproxy Logs using XAMPP and AWstats on a Memory Key

I have had a very difficult time figuring out how to properly process and use the data gathered from EZproxy logs. While the EZproxy email list is helpful, I have never found a step by step guide to processing EZproxy logs.

My method works for me, and I expect that others can improve and tweak what I’ve pulled together here for their own use. Please drop me a line and let me know if you’ve improved this technique.

I pulled this together using Aaron’s guide to setting AWstats up on XAMPP

http://9thport.net/archives/1004

I also used the OCLC EZproxy support site and the AWstats manuals.

1. Download and install XAMPP Portable on a memory key. Install XAMPP in the root directory the memory key. Start XAMPP and make sure that XAMPP is operating normally.

2. Download AWstats, and unzip to desktop

3. Copy the contents of the AWstats “wwwroot” folder to an “awstats” folder in XAMPP’s htdocs directory

4. Copy the AWstats tools folder to an “awstats” folder in the xampp folder

5. Create a new file in xampp/apache/conf/extra/ Name it awstats.conf with the following code

Alias /awstats/classes “e:/xampp/htdocs/awstats/classes”
Alias /awstats/icon “e:/xampp/htdocs/awstats/icon”
Alias /awstats/css “e:/xampp/htdocs/awstats/css”

ScriptAlias /awstats/cgi-bin/ “e:/xampp/htdocs/awstats/cgi-bin/”
<Directory xampp/htdocs/awstats/cgi-bin>
Options ExecCGI
</Directory>

You will need to modify this file based on where those folders are. Double check each file

My modification was to change the file paths to E:\ as xampp is installed on my memory key
This is not perfect, and if you use this memory key on a different computer make sure your drive letter for the memory key is E:\.

6. Add the following lines to your httpd.conf file (it should be in xamppp/apache/conf/httpd.conf)

Include “conf/extra/awstats.conf”

7. Restart apache and check that your changes are correct. If you have problems, check the error logs found in xampp/apache/logs This is where I spotted that I had forgotten the conf off of conf/extra/awstats in step 6

8. Build your AWstats profile by copying the awstats.model.conf fileand replacing ‘model’ with a short name for your site. I chose ‘connect’, thus the new file will be awstats.connect.conf

9. Make the following changes to your awstats.connect.conf file

a.

Logfile=”e:/path/to/log/files/ezp%YYYY-0%MM-0.log”

This change will only import this months logfile into AWstats. You can use other methods to import past files

b.

LogType=W

c.

LogFormat=4

This is when you’ve left EZproxy’s log files on the default setting. You can customize this further in EZproxy and AWstats

d.

DirData=”e:/xampp/htdocs/awstats/data”

Create the data folder manually, AWstats won’t create it for you

e.

DirCgi=”/awstats/”

f.

DirIcons=”/awstats/icon”

10. To process your log files, call perl, call the location of the awstats.pl file, specify the config name and the arguments.

e:/xampp/perl/bin/perl.exe e:/xampp/htdocs/awstats/cgi-bin/awstats.pl -config=connect -update -debug=3

I leave debug on level 3 because I like to watch whats going on. It also provides verbose help if you need to debug.

11. Once the data is updated in AWstats, you can access your report information at

http://localhost/awstats/cgi-bin/awstats.pl?config=connect

*thanks to Karen Ostler for spotting a few errors, corrected 18 May 2011

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: