Webalizer Configuration in Debian
What is Webalizer?
The Webalizer is a fast, free web server log file analysis program. It produces highly detailed, easily configurable usage reports in HTML format, for viewing with a standard web browser
If you want to install webalizer in Debian Use the following command
#apt-get install webalizer
This tells the webalizer.conf file to set itself up for this particular configuration setup with:
The option LogFile
specifies the logfile to use with Webalizer. The default log
file is supposed to be the access_log of Apache Web Server, but
you can specifies a different one, like the one Squid Proxy
Server makes named access.log if you use it in httpd-accelerator
The option OutputDir specifies the location of the output directory to use for the reports of Webalizer. All present and future report files generated by the Webalizer program will be hosted in this directory. It is recommended that you create this directory where your Apache web site resides.
The option Incremental if set to Yes tells the program only to process partial logs file, and allows you to rotate your log files as much as you want without the loss of access information. It's recommended to set this option to Yes.
PageType htm* cgi php
The option PageType specifies what file extensions you want Webalizer to consider as a page to count. Each added file extensions must be specified on its own line as shown in the Webalizer configuration file above.
HideURL *.gif *.GIF *.jpg *.JPG *.ra
The option HideURL specifies what kind of items such as graphic files, audio files or other non-html files to hide from the reports page. Each added item must be specified on its own line as shown in the Webalizer configuration file above.
The option IgnoreURL
specifies URLs to be completely ignored from the generated
statistics reports. This option can be used to ignore
directories that are not important in our statistics reports.
It's also useful when you want to manage and class which URLs
should be monitored and which should be ignored.
Now it's time to run the program to generate reports, html and graphics in the default Webalizer directory so that we can see them in our web browser interface. This step is required just the first time you install and use Webalizer, since it's preferable to use a cron job to automate this task in the future. To run Webalizer manually, to generate reports, use the following command:
[root@test ] /# /usr/bin/webalizer
Webalizer V1.30-04 (Linux 2.2.27) English
Using logfile /var/log/apache2/access.log
Creating output in /home/www/webalizer
Hostname for reports is 'sites.test.com'
History file not found...
Previous run data not found...
Saving current run data... [03/07/2005 04:42:03]
Generating report for April 2005
Generating summary report
Saving history information...
81 records (2 ignored) in 0.31 seconds
At this stage, we should verify that Webalizer is working on the system. To do that, point your web browser to the following address: http://my-web-server/webalizer/. The my-web-server is the address where your Apache web server lives, and usage is the directory that host all the Webalizer reports files.
This works well for single sites, but if you have a group of websites all on the same machine you might need to make some changes.