Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Analyze your webserver logs with The Webalizer UNIX
Last year, we published a hint on installing the webserver analysis program Analog. There are, of course, other analysis programs out there, one of which is The Webalizer. The Webalizer is a super fast and flexible open-source analysis package, and it's used on many sites, large and small. It's been the web analysis tool of choice on macosxhints.com for quite a while now.

Installing The Webalizer on OS X is a snap, thanks to a precompiled OS X version available on their download page. Just download the archive and expand it, then open a terminal and type a couple of commands:
 % sudo cp webalizer /usr/local/bin/webalizer
% sudo chmod 755 /usr/local/bin/webalizer
% sudo cp webalizer.1 /usr/local/share/man/man1/webalizer.1
% rehash
This installs The Webalizer (change the path if you don't wish to have it in /usr/local/bin) and the man page for the prgoram. Typing 'rehash' forces the shell to find the new program. Once that's done, just run the webalizer from a directory of your choice:
 % webalizer /var/log/httpd/access_log
The end result is an index.html file you can open in any web browser showing the usage of your Apache webserver. For more information on configuration options, check the 'man' pages.
    •    
  • Currently 2.33 / 5
  You rated: 3 / 5 (3 votes cast)
 
[11,341 views]  

Analyze your webserver logs with The Webalizer | 14 comments | Create New Account
Click here to return to the 'Analyze your webserver logs with The Webalizer' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Analyze your webserver logs with The Webalizer
Authored by: semiotek on May 07, '02 09:25:05AM

The line "% sudo cp webalizer.1 /usr/local/share/man/man1/webalizer.1" is giving me headaches.

Nick



[ Reply to This | # ]
Such as?
Authored by: robg on May 07, '02 11:44:33AM

What's the output when you try it?

-rob.



[ Reply to This | # ]
Such as?
Authored by: semiotek on May 07, '02 12:55:47PM

cp: /usr/local/share/man/man1/webalizer.1: No such file or directory



[ Reply to This | # ]
Such as?
Authored by: eo on May 07, '02 02:12:24PM

Take out the "local" to get /usr/share/man/man1/webalizer.1 and try it again.



[ Reply to This | # ]
missing target
Authored by: sjk on May 08, '02 03:10:33AM
Try this first:

sudo mkdir -p /usr/local/share/man/man1

... to create the destination directory since the error indicates it doesn't exist. The -p flag causes other directories leading up to the final destination to be created if they don't exist.


[ Reply to This | # ]
Analyze your webserver logs with The Webalizer
Authored by: eo on May 07, '02 12:20:58PM
Just a guess: maybe you need an extra
webalizer/
in there:
sudo cp webalizer/webalizer.1 /usr/local/share/man/man1/webalizer.1


[ Reply to This | # ]
fink
Authored by: bhines on May 08, '02 08:40:15PM

Um, why not just "fink install webalizer"?

It's in fink. You probably already have fink. Don't make life harder than you have to. :)



[ Reply to This | # ]
fink
Authored by: frankie1969 on Jun 26, '02 03:11:44PM

Nope.

[110:~] fuy% fink install webalizer
sudo /sw/bin/fink install webalizer
Password:
Information about 606 packages read in 2 seconds.
no package found for "webalizer"
Failed: no package found for specification 'webalizer'!



[ Reply to This | # ]
httpd.conf modif ?
Authored by: axelc on May 09, '02 08:42:01PM

Thanks for the tip ;

only thing is that while doing so the server was simply not restarting ; reason: could not find fully qualifed domain name - before all was working fine ... .

When I replaced the new httpd.conf file with the back-up I made, the server was restarting, but still could not find a "fully qualified domain name".



[ Reply to This | # ]
Whats wrong?
Authored by: larsen on Oct 03, '02 12:42:36PM

I installed as described above, but when I run:

% webalizer

I get "Command not found"

What is wrong?



[ Reply to This | # ]
Whats wrong?
Authored by: chaosp on Oct 11, '02 05:44:55PM

The new version dosent install the same as when the above instructions where written. Try this

1. open the terminal and move to the webalizer directory
2. type sudo ./install-osx
3. enter your password
4. now just follow the instructions

hope that helps



[ Reply to This | # ]
Whats wrong?
Authored by: derekkif on Oct 27, '02 01:25:33AM

I tried it but it didn't help.

Every time i write "webalizer" + a command in the terminal, even if I am in usr/local/bin, the terminal replies: Command not found.

Could it be the shell (ttyp1) that doesn't recognize webalizer?



[ Reply to This | # ]
Whats wrong?
Authored by: Andrew McDonald on Apr 18, '05 11:04:43AM

It looks as though the install-osx script exits before it can do anything. Delete, or comment out, the third instance of "exit;" (around line 13) and re-run. That worked for me.

Andrew



[ Reply to This | # ]
Analyze your webserver logs with The Webalizer
Authored by: matx on Aug 02, '06 01:06:33PM

This hint is a bit old, and that osx binary is really old. Here's my updated hint instructions:

0. install dev tools
1. install darwin ports installer (pkg)
2. in Terminal type: sudo /opt/local/bin/port -d selfupdate
3. then sudo /opt/local/bin/port install webalizer
4. then make a folder for webalizer results: mkdir web
5. cd web
6a. grab web logs from server (in /var/log/http/access_log)

you can use terminal to grab it : "scp user@server:/var/log/http/access_log ."

6b. type: webalizer access_log
7. open index.html of the analysis

-x

---
Mat X -- VFX Mac Tech



[ Reply to This | # ]