Web Hosting Forum | Lunarpages

Author Topic: How to Install and Use Your Own Webalizer  (Read 127910 times)

katrina1

  • Guest
How to Install and Use Your Own Webalizer
« on: May 28, 2004, 07:30:40 AM »
How to Install and Use Your Own Webalizer

If stats are important to you or you want to share them, you can install your own copy of Webalizer on your computer. Unfortunately, the instructions that come with it are written for Linux/Unix systems and not for Windows, even in the Windows install!

1. Download a copy of Webalizer at http://www.mrunix.net/webalizer/download.html Get the Binary distribution for Win32.

2. Unzip it to a folder on your hard drive such as x:\webalizer where x is the drive designation.

3. In a text editor or, better yet, a proper file editor such as tswebeditor , open the sample.conf file. Click on File, Save As, and save it as webalizer.conf. This is the name Webalizer will be looking for when it runs.

4. Now browse through the file. All the variables have been commented out with a “#” and there are full explanations preceding them. You will want to uncomment most of the variables and make changes where necessary.

Read the explanations. Be sure not to uncomment the explanations.

For testing purposes, you may wish to download a raw log file into your webalizer folder and set LogFile in line 28 to the name of it. You should comment it out when done.

OutputDir in line 42 should be set to a subdirectory of the webalizer directory or to some other folder such as c:/webalizer/output or c:/mysitestats

HostName in line 94 should be set to your domain name.

PageType in lines 108-112 are fine by default but you may want to add .php as a type.

DNSCache in line 131 should not be uncommented if running webalizer in Windows. It only works with Linux/Unix. You won’t be able to resolve countries because of this.

GMTTime in line 221 may be changed to yes if you prefer GMT time.

VisitTimeout in line 252 may be changed if you wish. The default is fine too.

IndexAlias on lines 253 and 254, be careful about adding to these or even uncommenting them. They will slow webalizer down.

Hide* , the Hide commands can be used to tailor your reports and eliminate various items or group them together. You will have to play with these to get what you want.

MangleAgents on line 512 may be changed if you really care what browser they used. You should change it to something above 0.

DumpPath in line 545 leave commented out to send the output to the output file you specified instead.

DumpExtension in line 561 should be changed to csv if you might want to use Excel to look at the results.

Dump* in lines 566-571 may be changed to yes to dump for Excel. Not necessary otherwise.

5. Test your installation. Run webalizer.exe. If you don’t get any errors and you get output, congratulations! If you do get errors, check your conf file again.

6. Now you will want to comment out LogFile in line 28 again.

7. Download your raw access files to the webalizer folder.

8. To run Webalizer, go to Start, Run and type in path\webalizer.exe filename.gz

ie c:\webalizer\webalizer.exe mysite.com-may-2004.gz

Be sure to move the output to another folder or subfolder to keep it.

This could all be automated with a simple batch file:

@echo off
echo LIST of STATS (.gz) FILES
echo.
for %%A in (*.gz) do echo %%A
echo.
echo.
set /p file=ENTER FILE NAME(I.E. mysite.com-month-year.gz)
c:\webalizer\webalizer.exe %file%

Pause

:Begin
@echo off
set /p folder=ENTER THE STATS FOLDER NAME(I.E. May2004)

:Process
cd c:\webalizer
md c:\webalizer\%folder%
move c:\webalizer\output\*.* c:\webalizer\%folder%

:End

Copy and paste it in a text editor like Notepad (NOT a word processor like Word) and edit the paths. Save it to a file in your webalizer folder. Name it what you please as long as it ends in .bat such as "stats.bat". The :labels are included in case you are feeling adventurous and want to add error checking.

HINT: If you want to share stats with someone else such as a customer, you can upload the output folder to your account under public_html and have them browse to it. It works like any other web page. You can password protect the folder with Web Protect in Cpanel if you wish. You could also design a custom Excel file using dumps to show off the stats since this would be easy to email. Or you can zip up the output folder and attach to an email.

Danielle

  • Guest
How to Install and Use Your Own Webalizer
« Reply #1 on: May 28, 2004, 07:59:33 AM »
Great job Katrina  :yey:

Offline skeetley

  • Quantum Encyclopedia Writer
  • *****
  • Posts: 3251
How to Install and Use Your Own Webalizer
« Reply #2 on: May 28, 2004, 09:46:59 AM »
:thumb: Katrina
- Tell them skeetley sent you...

Offline Jwink3101

  • Über Jedi
  • *****
  • Posts: 1831
  • The one and only.
How to Install and Use Your Own Webalizer
« Reply #3 on: June 05, 2004, 03:37:57 PM »
I guess you beat me to it. People have been asking me to write one of these but i have been very busy (notice i haven't been around in a while). I guess it is better seeing as the one you wrote is much more in depth.

Offline kenwvs

  • Space Explorer
  • ***
  • Posts: 9
Re: How to Install and Use Your Own Webalizer
« Reply #4 on: February 25, 2007, 10:23:45 AM »
I have followed these instructions, but have apparantely missed something as I am confused.........

I have renamed the config file, gone through it and uncommented most items, left most settings at default and unzipped the webalizer to a directory called c:/webalizer on my computer.  I have also downloaded a raw access file and saved it in a directory called logtest (on a side note, has anyone had troubles downloading the raw access file using IE7.......I get an error and have had to use Firefox)

When I go to Start Run and type in c:\webalizer\webalizer.exe logtest\accesslog_albertaga.net_2_25_2007.gz   I get a quick black box flashing on my screen and it then dissappears.

Any ideas what I have missed in this process

Ken

Offline SteveW

  • Master Jedi
  • *****
  • Posts: 1394
Re: How to Install and Use Your Own Webalizer
« Reply #5 on: February 25, 2007, 10:39:31 AM »
has anyone had troubles downloading the raw access file using IE7.......I get an error and have had to use Firefox)
I think this has been reported in the past as sometimes a problem, but I don't remember much about it. Search the forums for something like: download log "internet explorer"

Quote
When I go to Start Run and type in c:\webalizer\webalizer.exe logtest\accesslog_albertaga.net_2_25_2007.gz   I get a quick black box flashing on my screen and it then dissappears.
It's possible it's working just fine. However, webalizer is a DOS program, and when it exits, the DOS box closes without allowing you to see whatever messages it output.

Instead of using Start|Run, open a command prompt (Start > All Programs > Accessories > Command Prompt), browse to the folder you're using, and type the webalizer command line. Then you'll see webalizer's messages. When done, type exit at the prompt:
C:\dir\dir\.....> exit <cr>
« Last Edit: February 25, 2007, 10:41:29 AM by SteveW »

Offline kenwvs

  • Space Explorer
  • ***
  • Posts: 9
Re: How to Install and Use Your Own Webalizer
« Reply #6 on: February 25, 2007, 12:38:27 PM »
I have tried to do this through the command prompt

This is what i then get.......have i made a major error in the setup of this program.  Basically, I want to be able to see the stats for my site..........is it a tough process to see these on a regular basis.

Here is what I get.....

c:\webalizer>webalizer.exe  logtest/accesslog_albertaga.net_2_25_2007.gz
Webalizer V2.01-10 (CYGWIN_NT-5.1  1.3.10 <0.51/3/2>>English
Using logfile logtest/accesslog_2_25_2007.gz (gzip-clf)
Error: Can't change directory to c:/webalizer/albertagastats

I have also tried to move the access log into the webalizer directory and get the same error (except the logtest directory)

Any hints where i have erred in trying to get this working

Ken   

Offline SteveW

  • Master Jedi
  • *****
  • Posts: 1394
Re: How to Install and Use Your Own Webalizer
« Reply #7 on: February 25, 2007, 04:25:38 PM »
a tough process to see these on a regular basis.
haha I noticed that, too, but it's really not so bad. Once you get it working, you can create a Command Prompt shortcut for Webalizer. In the shortcut you can specify the directory to run in. In your .conf file specify the log file name (something short). When you download your log file, rename it to that short name. Then move the shortcut to your desktop or wherever you want to use it. Then run the shortcut. The DOS box will briefly appear, disappear, and your data will be ready to view.

Quote
c:\webalizer>webalizer.exe  logtest/accesslog_albertaga.net_2_25_2007.gz
Try
c:\webalizer>webalizer.exe  logtest\accesslog_albertaga.net_2_25_2007.gz

If that still doesn't work, try
c:\webalizer>webalizer.exe  \logtest\accesslog_albertaga.net_2_25_2007.gz
and
c:\webalizer>webalizer.exe  c:\logtest\accesslog_albertaga.net_2_25_2007.gz

If it won't accept the absolute path, maybe it requires that your logs dir be a subdir of \webalizer. Clearly it's having some kind of trouble with the path. It'll work eventually. If all else fails, put the log files into \webalizer and see if that works.
« Last Edit: February 25, 2007, 04:32:06 PM by SteveW »

Offline kenwvs

  • Space Explorer
  • ***
  • Posts: 9
Re: How to Install and Use Your Own Webalizer
« Reply #8 on: February 25, 2007, 09:33:53 PM »
I have got this to the point that if I specify a log file in the webalizer.conf file it will go throught the process and it then says 1128 records (1182 ignored) in 0.2 seconds  and then ends the process.

Is this normal, or is it an error of some sort?  If I then turn off that command in the file, and just type in webalizer.exe it goes to the process of reading the history file, from the right location but just stays there for a loooonnnnggg time, without ever completing the process.

Is this an error?

What should I be doing differently to get some stats?  Once I get the stats working, then I can try to make an automated process.......but first to get some stats would be nice.

thanks for any suggestions.!!

Ken

Offline SteveW

  • Master Jedi
  • *****
  • Posts: 1394
Re: How to Install and Use Your Own Webalizer
« Reply #9 on: February 25, 2007, 11:53:47 PM »
I have got this to the point that if I specify a log file in the webalizer.conf file it will go throught the process and it then says 1128 records (1182 ignored) in 0.2 seconds  and then ends the process.
The unusual thing is the high number of ignored records. If there's a setting in .conf for verbose output, try that. It should (I think) be reporting why the records were ignored. It's usually because fields were too long (> 256 chars, I think), which happens often in the referrer field. If it's anything else, it would be unusual.

All the stats are placed into HTML files. If any part of the processing was successful, then either in the \webalizer folder or your logs folder you should find a whole bunch of new files, plus an index.html. To view the stats (if any) open index.html with your browser.

Quote
Is this normal, or is it an error of some sort?  If I then turn off that command in the file, and just type in webalizer.exe it goes to the process of reading the history file, from the right location but just stays there for a loooonnnnggg time, without ever completing the process. Is this an error?
I'm not sure about this, and I'm reaching the limits of what I know.

One other thing to try would be: go to cpanel > File Manager > /logs directory and unzip your log file on the server. Then download that as plain text, and feed it to webalizer. If this works, it would suggest your log files are being corrupted during their download as .gz.
« Last Edit: February 25, 2007, 11:55:52 PM by SteveW »

Offline kenwvs

  • Space Explorer
  • ***
  • Posts: 9
Re: How to Install and Use Your Own Webalizer
« Reply #10 on: February 26, 2007, 04:59:24 AM »
I have given up on this process and have successfully installed AW Stas and have it working properly and giving me the stats for my site.

Thanks for all the help

Ken

Offline mbabc

  • Pong! (the videogame) Master
  • *****
  • Posts: 20
Re: How to Install and Use Your Own Webalizer
« Reply #11 on: April 14, 2007, 04:50:00 PM »
The instructions for using Webalizer on a PC are very clear. I'm hoping that someone can do a similar list for Mac OS X for a user with almost no Unix experience.

Offline Hostalot

  • Intergalactic Cowboy
  • *****
  • Posts: 63
    • Cheap Webhosting
Re: How to Install and Use Your Own Webalizer
« Reply #12 on: April 15, 2007, 08:17:50 AM »
Yes, I prefer AWStats as well but good tutorial nevertheless! Http-Analyze is a good little program as well.
Cheap web hosting review directory
Cheapest web hosting plans listed in one directory
Lunarpages Review - plans, support, uptime, speed test and features

Offline jdrew

  • Spacescooter Operator
  • *****
  • Posts: 34
Re: How to Install and Use Your Own Webalizer
« Reply #13 on: July 18, 2007, 04:55:41 PM »
Great tutorial.  One question.  Is there a way to get the cumulative file for the webstats.  Every time I download the raw log file, it's only for two days.  I was under the impression that the file kept building every day.  It must somewhere, because the webalizer stats in cpanel are cumulative for the month (and year).  So, where can I download that raw log file?
Thanks.

Offline SteveW

  • Master Jedi
  • *****
  • Posts: 1394
Re: How to Install and Use Your Own Webalizer
« Reply #14 on: July 18, 2007, 09:55:19 PM »
Each day after your server does a stats run, your raw log file is deleted.  To make it accumulate, go to cpanel > Raw Log Manager, check the "Archive raw logs" checkbox and clear the "Delete raw logs" checkbox.

Your raw log will accumulate in a .gz file that you can download any time you want from Raw Log Manager. If you want to delete it after downloading it (so you don't repeatedly get data you've already downloaded and processed), go to cpanel > File Manager > Logs (directory), where you'll see the file and can delete it. The next day, when the server finds that the .gz file has been deleted, it just starts a new one. So each time you download and delete, you'll be getting only new data. 

The reason Webalizer's statistics are cumulative even though the raw logs are deleted is that it keeps its own data files where it stores the statistics only.  Each stats run updates those numbers. After that, it no longer needs the raw data. 

 

Share |