How to Install AWStats (Apache Log Analyzer) on Ubuntu, Debian & LinuxMint

AWStats is a free and very powerful tool that creating statics by analyzing Apache log files, ftp or mail servers. AWStats log analyzer works on CGI or command line interface and generate graphical statics from log files.
This tutorial will help you to install AWStats Apache Log Analyzer on Ubuntu, Debian and LinuxMint systems.. This article has been tested with Ubuntu 14.04 LTS only.

Step 1 – Install AWStats & Apache Package
AWStats required Apache web server to be running. If you don’t have Apache install Use below commands to install Apache2 web server and awstats packages. It will also install all other required dependencies.
$ sudo apt-get install awstats apache2

Step 2 – Configure Apache

Now create Apache configuration file for awstats setup. Use your favorite text editor and edit a new file /etc/apache2/conf-available/awstats.conf.
$ sudo nano /etc/apache2/conf-available/awstats.conf
Now add the following configuration
ScriptAlias /awstats/ /usr/lib/cgi-bin/
Alias /awstats-icon/ /usr/share/awstats/icon/
Alias /awstatsclasses/ /usr/share/java/awstats/

<Directory "/usr/lib/cgi-bin/">
    Options None
    AllowOverride None
    <IfModule mod_authz_core.c>
        # Apache 2.4 
        Require host
    <IfModule !mod_authz_core.c>
        # Apache 2.2
        Order allow,deny
        Allow from
        Allow from ::1

Now enable CGI module (if not enabled) and Also enable Awstats apache configuration.
$ sudo a2enmod cgi
$ sudo a2enconf awstats
Restart Apache service to reload new settings
$ sudo service apache2 restart

Step 3 – Create AWStats Configuration File

It’s required to create a configuration file for each of your website for which statics need to generate. Copy AWStats example configuration file with new name and make changes as below.
$ sudo cp /etc/awstats/awstats.conf /etc/awstats/
$ sudo vim /etc/awstats/
Update below settings in file
Now execute following command to update logs files
$ sudo /usr/lib/cgi-bin/ -update

Step 4 – Access AWStats in Browser

Use your server ip address or domain name to access AWStats statics. Change domain name at the end of url as per your settings.
example url : -
    Congratulation’s! you have successfully configured AWStats for you website.hackthesec

About Author:

I am a Linux Administrator and Security Expert with this site i can help lot's of people about linux knowladge and as per security expert i also intersted about hacking related news.TwitterFacebook

Newer Post
Older Post


Post a Comment