AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Awstats buildstaticpages8/9/2023 The directory which will hold the traffic reports can be located inside our web site’s root directory, so that they are accessible from a web browser. So, we create the first one inside the awstats installation directory: # mkdir /home/jsmith/awstats/statdata ![]() We will need to create two more directories, one for the awstats statistical data and one for the traffic reports (static HTML pages). You may want to rename this to just awstats: # mv awstats-X.X awstats This is where all scripts and other supplemental files are installed. So, download the latest awstats version from the Project Page and extract it: # tar -xzvf awstats-X.X.tar.gz -C /home/jsmith/Ī new directory ( awstats-X.X) is created in our Home. We will install the AWstats package in our Home directory. Custom installation in our Home directory For this article we will use an apache log file in the " combined" format. This is not necessary though.Īctually, only the last one is a necessity, as awstats can be configured to generate statistics even from heavily customized log formats. ![]() This means that the log files contain the visitors’ hostnames instead of their IP addresses in the HOST field. You have configured the Apache web server to do reverse DNS lookups ( HostnameLookups On).The log file is written in the " combined" format (NCSA combined/XLF/ELF log format).Our web site is configured to have its own log file.Make a quick introduction to user-defined charts.We will focus on the creation of static HTML reports, but some info on how to use as a CGI is also provided. Use this statistical data to generate web site traffic reports.Parse this host’s log file and create a database with statistical data.Create a configuration file for our web site (Apache Virtual Host) for as accurate statistics as possible.The rest of the configuration stays the same. The differences between the two methods are just the scripts’ locations. Although it is possible to have a system-wide installation, I chose this approach for completeness. Install AWstats in a custom location as a normal user.It also comes with some other helper Perl scripts to make this task even easier. This document is not intended to be a review, but rather a quick installation and configuration guide for a specific web site, in order to have as accurate statistical data as possible for use in your traffic analysis reports.ĪWstats is actually a Perl script ( ), which parses your server’s log files and generates reports either dynamically, when used as a CGI script through the web browser, or by creating static HTML pages, when used directly from the command line or through cron. It can generate advanced graphical statistics from web, streaming, ftp or mail server log files. AWstats is a free, popular log analyzer, released under the GPL. (please, note that the exec(.) invocation have has been replaced with system, in order to continue in the execution after the first command. System($awstats_build) # || die "Error invoking 'awstats_': $!" # create dest directory and all its parents. System("$root/virtualmin-awstats/", # || die "Failed to run $root/virtualmin-awstats/ : $!" = BEGIN OF webmin_ patch = #!/usr/bin/perl Hope it can help someone AND/OR virtualmin developers will consider to add in the official distribution AND/OR i can find the time to submit a proper patch:ġ) modify the script (usually you can find it in: /etc/webmin/) as follows: ![]() I know it is an old question, but I just want to share the little "hacks" i've done in order to solve this issue.
0 Comments
Read More
Leave a Reply. |