Recent from talks
Contribute something
Nothing was collected or created yet.
AWStats
View on Wikipedia| AWStats | |
|---|---|
| Original author | Laurent Destailleur |
| Initial release | May 2, 2000 |
| Stable release | 8.0[1] |
| Repository | |
| Written in | Perl |
| Operating system | Cross-platform |
| Type | Web analytics |
| License | GNU General Public License |
| Website | www |
AWStats (Advanced Web Statistics) is an open source Web analytics reporting tool, suitable for analyzing data from Internet services such as web, streaming media, mail, and FTP servers. AWStats parses and analyzes server log files, producing HTML reports. Data is visually presented within reports by tables and bar graphs. Static reports can be created through a command line interface, and on-demand reporting is supported through a Web browser CGI program.[2]
AWStats supports most major web server log file formats including Apache (NCSA combined/XLF/ELF log format or Common Log Format (CLF)), WebStar, IIS (W3C log format), and many other common web server log formats.
Development was moved from SourceForge to GitHub in 2014.[3]
Cross-platform availability
[edit]Written in Perl, AWStats can be deployed on almost any operating system. It is a server-based website log analysis tool, with packages available for most Linux distributions. AWStats can be installed on a workstation, such as Microsoft Windows, for local use in situations where log files can be downloaded from a remote server.[2]
Licensing
[edit]AWStats is licensed under the GNU General Public License (GPL).[4]
Support
[edit]Proper web log analysis tool configuration and report interpretation requires a bit of technical and business knowledge. AWStats support resources include documentation[5] and user community forums[6]
Security considerations
[edit]The on-demand CGI program has been the object of security exploits, as is the case of many CGI programs. Organizations wishing to provide public access to their Web analytics reports should consider generating static HTML reports. The on-demand facility can still be used by restricting its use to internal users. Precautions should be taken against referrer spam. Referrer spam filtering functionality was added in version 6.5.[7]
See also
[edit]References
[edit]- ^ "Release 8.0". 26 August 2025. Retrieved 13 September 2025.
- ^ a b "Awstats: static generated reports of web logs". CALOMEL. 2012-03-21. Archived from the original on 2015-03-17. Retrieved 2015-02-12.
{{cite web}}: CS1 maint: bot: original URL status unknown (link) - ^ "Source move announcement by AWStats author".
- ^ "AWStats License / Copyright". AWStats. 2012-03-21. Archived from the original on 2015-02-09. Retrieved 2015-02-12.
{{cite web}}: CS1 maint: bot: original URL status unknown (link) - ^ "AWStats logfile analyzer 7.4 Documentation". AWStats. Retrieved 2015-02-12.
- ^ "AWStats (forum)". Source Forge. Retrieved 2015-02-12.
- ^ "SkipReferrersBlackList: Version: 6.5+". AWStats. Retrieved 2015-02-12.
External links
[edit]AWStats
View on GrokipediaOverview and History
Overview
AWStats (Advanced Web Statistics) is an open-source, Perl-based log file analyzer designed to process raw server logs from web, FTP, mail, and streaming servers, generating comprehensive statistics reports in graphical HTML format featuring tables and bar graphs.[5] It excels at extracting insights from log data without requiring proprietary software, making it accessible for system administrators and web developers seeking detailed analytics.[5] The tool's primary use cases involve tracking website traffic patterns, such as the number of visits and unique visitors, analyzing visitor behavior including domains, browsers, operating systems, and search engine referrals, and monitoring server performance metrics like errors and bandwidth usage derived directly from log files.[5] By parsing formats from various servers, including Apache's NCSA combined, common log format (CLF), extended log format (ELF), and Microsoft IIS W3C logs, AWStats provides a unified view of activity across different environments.[5] AWStats operates in two main modes: as a CGI script for on-demand dynamic report generation via a web browser, allowing real-time filtering and updates, or via the command line for producing static HTML files that can be scheduled for periodic regeneration.[5] Its key benefits include being freely available under the GNU General Public License version 3, efficient processing of large log volumes through intermediary database files that store partial analysis data for faster subsequent runs, and broad compatibility with servers like Apache and IIS without needing specialized Perl libraries.[5]Development History
AWStats originated as a personal project in 1997, developed by French programmer Laurent Destailleur to analyze web server log files and generate statistics for his own websites.[5] Destailleur, who later founded the Dolibarr ERP/CRM project, created the tool using Perl to address the need for a flexible, open-source log analyzer at a time when commercial alternatives dominated web analytics.[6] The first public release, version 1.0, occurred on May 2, 2000, marking AWStats' availability as free software under the GNU General Public License.[1] Initial versions focused on basic parsing of Apache and other server logs, supporting common formats like NCSA and providing reports on visits, unique visitors, and bandwidth usage. Development progressed steadily through the early 2000s, with version 3.0 in 2001 introducing daily reports and enhanced log format support.[7][8] Key milestones included the addition of referrer spam filtering in version 6.5, released on December 24, 2005, which introduced the SkipReferrersBlackList directive to exclude spam referrers and improve report accuracy amid rising web spam.[9] In 2014, the project transitioned from SourceForge's CVS system to GitHub, facilitating better collaboration through merge requests and version control, as announced by Destailleur.[10] This move aligned with broader open-source trends toward distributed version control. The latest stable release, version 8.0, was issued on August 26, 2025, incorporating updates like modern robot databases while maintaining backward compatibility.[11] This version signified the end of active development by Destailleur, who stated it would be his final major contribution after over two decades.[8] Following the release, AWStats entered maintenance mode, but as of November 2025, the project has been deprecated with no further active development or community updates, and migration to alternatives like Matomo Log Analytics is recommended.[2]Features
Core Analytics Capabilities
AWStats provides a robust set of core analytics capabilities by processing server log files to extract key performance indicators related to web traffic. Among the primary traffic metrics, it calculates the number of unique visitors, total visits, pages viewed, hits, bandwidth usage in kilobytes, and average visit duration, offering insights into overall site engagement and resource consumption.[5] These metrics enable administrators to quantify site popularity and identify trends in user interaction without requiring real-time monitoring.[5] In visitor profiling, AWStats detects and categorizes users across 269 domains and countries, 45 operating systems, over 123 browsers (including mobile variants, totaling up to 482 with dedicated phone browser databases), and 381 types of robots or search engine crawlers.[5] This segmentation helps in understanding the demographic and technical diversity of the audience, such as the prevalence of specific operating systems like Windows or Linux, or browsers including Chrome and Firefox.[5] Additionally, it supports GeoIP integration via MaxMind databases to resolve visitor locations to regions and cities, enhancing geographic profiling.[5] Content analysis in AWStats focuses on user interactions with site resources, identifying the most viewed, entry, and exit pages to reveal navigation patterns and popular content.[5] It also tracks file types and downloads, such as PDFs and archives, alongside HTTP errors like 404s (including referrer details for troubleshooting) and search engine queries from 122 engines, capturing keywords and phrases to inform SEO strategies.[5] Time-based breakdowns provide granular views of usage patterns, including distributions by months, days of the week, hours of the day, and the most recent visits, allowing for analysis of peak traffic periods and seasonal variations in pages viewed, hits, and bandwidth.[5]Reporting and Customization Options
AWStats generates reports in two main formats to suit different user needs: dynamic CGI-based reports that enable real-time interactive filtering and static HTML pages designed for offline viewing and sharing. In CGI mode, activated by settingAllowToUpdateStatsFromBrowser=1 in the configuration file, users can apply dynamic filters such as selecting specific months, hosts, or referrers directly through a web interface, allowing on-the-fly data refinement without regenerating the entire report. Static HTML reports, produced via command-line execution with options like -output to specify the file path, provide a lightweight alternative that can be hosted independently or archived for historical analysis.[9]
Reports feature a range of visualizations to present data clearly, including bar graphs for trends in core metrics like hits and unique visitors, detailed tables for breakdowns such as error codes or file types, and customizable CSS-based themes to adjust colors and layouts for better readability. Multi-language support enhances accessibility, with interfaces available in 43 languages including English and French, configured via the Lang directive to automatically detect and apply the appropriate localization. Graphical elements are rendered using built-in icons from the DirIcons directory, ensuring consistent presentation across reports.[5][9][12]
Customization options allow users to tailor reports extensively, primarily through plugins that add specialized functionality without altering the core code. For example, the GeoIP plugin, loaded with LoadPlugin="geoipfree", integrates MaxMind GeoLite databases to enable detailed geographic reporting at city and ISP levels, revealing visitor origins beyond basic country data. Other plugins support ISP-specific breakdowns or custom sections, while XML output—enabled by setting BuildReportFormat=[xhtml](/page/XHTML)—facilitates integration with external tools like XSLT processors for advanced data manipulation. Dynamic filters in CGI mode further personalize views by excluding or highlighting patterns via regex-based directives such as OnlyHosts or SkipFiles.[9][5]
AWStats also includes dedicated tools for niche reporting needs, such as web compression statistics for modules like mod_gzip or mod_deflate, which track input/output bytes when the log format includes fields like %gzipin and %gzipout, activated via ShowFileTypesStats=HB C. Authenticated user tracking captures login details from logs, displaying the number of unique authenticated visitors and their latest activity in dedicated report sections, enabled by setting ShowAuthenticatedUsers=1 in the configuration file; access to reports can be restricted with directives like AllowAccessFromWebToAuthenticatedUsersOnly=1. These features ensure reports can be adapted for specific server environments and security requirements.[9][5]
Technical Architecture
System Requirements and Compatibility
AWStats requires Perl version 5.007 or higher for operation, with support for distributions such as ActivePerl on Windows systems.[13][12] Optional Perl modules, such as Geo::IP or Geo::IPfree, enable advanced plugins like geolocation features.[14] The software exhibits strong cross-platform compatibility, running on Unix and Linux distributions including RedHat and Debian, as well as Windows NT/2000, MacOS, and Solaris, without OS-specific dependencies thanks to its Perl foundation.[12] Hardware demands are minimal, allowing AWStats to handle log files of effectively unlimited size through efficient processing of partial or incremental files; however, enabling DNS lookups for IP resolution requires network connectivity.[12][3] AWStats is compatible with various log formats, including Apache's combined and NCSA logs, IIS W3C extended logs, WebStar native format, and custom configurations.[12] For scenarios involving split or multiple log files, the included logresolvemerge.pl tool facilitates merging and preprocessing.[12]Log Analysis Process
AWStats initiates the log analysis by reading input log files specified in the configuration, processing them line by line in chronological order to handle unsorted or split logs efficiently. The parsing workflow begins with bypassing previously analyzed records to focus on new entries, followed by extracting key fields such as IP address (%host), timestamp (%time1), HTTP method and URL (%methodurl), status code (%code), bytes transferred (%bytesd), referrer (%refererquot), and user agent (%uaquot) using a regex-based LogFormat directive. This format, customizable for various server types like Apache combined logs (LogFormat=1), enables flexible interpretation of log structures without requiring the entire file to be reloaded into memory.[15] To enhance efficiency with large log volumes, AWStats employs partial updates that process only newly added lines, avoiding full re-parsing of historical data, and utilizes temporary .tmp files for locking mechanisms during updates to prevent concurrent access issues. It also supports load balancing across multiple log sources and optional DNS resolution for converting IP addresses to hostnames, which can be accelerated via caching in files like dnscache.txt or multithreaded tools. These techniques allow handling of high-traffic logs without excessive resource consumption, as demonstrated in processing examples where only qualified new records (e.g., 225,521 out of 225,730 lines) are analyzed.[15] Preprocessing is facilitated by dedicated Perl scripts to prepare non-standard or rotated logs for analysis. The maillogconvert.pl tool converts mail server logs from formats like Postfix or Sendmail into an AWStats-compatible structure, supporting modes for standard or virtual admin logs. Similarly, logresolvemerge.pl merges multiple rotated or split log files into a single chronological stream, optionally performing DNS lookups to resolve hostnames in advance, thereby streamlining the main parsing phase.[15] Upon completion, the extracted data is aggregated and stored in plain text databases, such as awstatsMMYYYY.txt files located in the DirData directory (defaulting to the current directory), which serve as lightweight, queryable structures for rapid report generation without repeated log scans. These databases maintain historical data across monthly files, with optional storage in XML format via the BuildHistoryFormat directive for interoperability.[15]Installation and Configuration
Setup Procedures
To set up AWStats, begin by downloading the latest stable release from the official SourceForge project page, where it is distributed as a compressed archive such as a tarball or ZIP file.[16] Unpack the archive into a suitable CGI directory on your web server, for example,/usr/local/awstats on Unix-like systems or the appropriate CGI-bin folder on Windows servers running IIS or Apache. This placement ensures the Perl scripts can be executed via the web server.[17]
Next, execute the initial setup script by navigating to the tools subdirectory within the unpacked AWStats directory and running perl awstats_configure.pl. This interactive Perl script automatically detects the web server type (such as Apache or IIS), prompts for site-specific details like the domain name and log file location, generates a configuration file (e.g., awstats.mysite.conf), and sets appropriate file permissions for security and functionality. The script requires Perl to be installed on the system, as AWStats is a Perl-based application compatible with most platforms including Linux, Unix, and Windows.[17]
For log integration, edit the generated configuration file to specify the path to your server's access log file, such as /var/log/apache/access.log for Apache on Linux. Set the LogFile directive to the full path, configure LogType to "W" for standard web logs, and select the appropriate LogFormat (e.g., "1" for NCSA combined log format). To verify the setup, test log parsing by running the command perl awstats.pl -config=mysite -update from the command line, which processes the log file and builds the initial statistics database without generating a report.[17]
To enable ongoing analysis, schedule periodic updates using system tools like cron on Unix/Linux or the Task Scheduler on Windows. For instance, add a cron job entry such as 0 23 * * * /path/to/[perl](/page/Perl) /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -config=mysite -update to run daily at 11:00 PM, ensuring new log entries are parsed automatically. This automation keeps statistics current without manual intervention.[17]
Configuration Directives
AWStats configuration is managed through a dedicated.conf file for each analyzed site, where users define parameters to customize log processing, filtering, and output behavior. These directives allow tailoring the tool to specific server environments and analysis needs, with most accepting string, integer, or boolean values. All directives are case-sensitive and can be set as key-value pairs in the configuration file, overriding default behaviors to optimize performance and accuracy.[9]
Core directives establish the foundational setup for log analysis. The LogFile directive specifies the full path to the log file being analyzed, supporting dynamic placeholders such as %YYYY-%MM-%DD for date-based log rotation (e.g., LogFile="/var/log/[httpd](/page/Httpd)/access.%YYYY-%MM-%DD.log").[9] The LogType parameter determines the log category, with options like "W" for web server logs, "M" for mail logs, or "F" for FTP logs; the default is "W" for standard web analysis.[9] SiteDomain sets the primary domain name for resolving full URLs in reports (e.g., SiteDomain="www.[example.com](/page/Example.com)"), aiding in accurate traffic attribution.[9] Additionally, DNSLookup controls hostname resolution, where 0 disables lookups for speed, 1 enables full DNS queries, and 2 uses a static cache; the default is 2 to balance performance and detail.[9]
Filtering options help exclude irrelevant data to focus on meaningful metrics. SkipFiles defines patterns or specific URLs to ignore during analysis, such as static assets (e.g., SkipFiles="REGEX[^/icons/]" to skip icon directories).[9] NotPageList lists file extensions or patterns not counted as full pages, like images or scripts (e.g., NotPageList="css js gif jpg jpeg png bmp"), with a default excluding common non-content files such as "css js class gif jpg jpeg png bmp rss xml swf".[9] For spam mitigation, LevelForWormsDetection sets the detection intensity, with 0 disabling it, 1 enabling medium filtering, and 2 activating full checks; the default is 0 to avoid false positives.[9]
Report settings influence localization and access controls. The Lang directive selects the interface language, such as "en" for English or "auto" to detect based on browser settings; the default is "auto" for multilingual support.[9] AllowToUpdateStatsFromBrowser restricts direct updates via web interface for security, defaulting to 0 (disabled) to prevent unauthorized modifications.[9] Similarly, SaveDatabaseFilesWithPermissionsForEveryone controls file permissions for generated databases, with 0 (default) limiting access to the owner only, enhancing data protection.[9]
Plugin loading extends functionality through modular additions. The LoadPlugin directive imports external modules, specified as the plugin name followed by its path (e.g., LoadPlugin="geoip /usr/local/lib/site_perl/GeoIP.pm" for IP geolocation). Multiple plugins can be loaded sequentially, enabling features like custom metrics without altering core code.[9]
