Restart apache for the config to take effect. In case your apache server has /cgi-bin/ configured, it may make /cgi-bin/ accessible. Note that we added cgi-bin/ also in above config. Edit the awstats domain configuration file you just created /etc/awstats/ to have LogFormat1. $ sudo htpasswd -c /etc/auth_awstats awstatsĪdd the following config in nf to enable http basic auth: We’ll create user awstats in file /etc/auth_awstats with desired password. At this point, the simple awstats has been configured, restart the following lighttpd, and then execute. Now visit your awstats site at the url /awstats/. Now check the config syntax and if everything is fine, then restart apache.
Replace ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ in nf with the following line. $ sudo cp /usr/share/doc/awstats/examples/nf /etc/apache2/conf-enabled/nf Not setup apache conf by copying and editing sample apache conf present in awstats package. rw-rw-r- 1 www-data www-data 7014 Nov 27 17:10 dnscachelastupdate.hash Awstats is a statistics/analysis tool that collects data from visitors who view a web site. rw-rw-r- 1 www-data www-data 15723 Nov 27 17:10 awstats112015.txt Awstats is a statistics/analysis tool that collects data from visitors who Published, Updated with settings for different types of URLs. Since cron runs every 10 min, wait for few minutes (max 10 minutes) and you should be able to see data files in /var/lib/awstats/ To view the cron entries, run the following:ġ0 03 * * * You may want to change MAILTO value to you email address. LogFile="/var/log/apache2/access_log.%YYYY-0-%MM-0-%DD-0"Īs part of the package installation AWStats also installs cron which runs as www-data to populate data in /var/lib/awstats/. Depending upon you log file name and domain name change the value of LogFile and SiteDomain.
Here are steps to install AWStats on Ubuntu Linux: Install AWStats package on Ubuntu LinuxĮdit awstats config file at location /etc/awstats/ using sudo.
nano /etc/awstats/nf Update the settings shown below.
cp /etc/AwStats/nf /etc/awstats/nf Edit the your AwStats domain name configuration file. Should there be a problem transferring an account from a server running: WHM 11.20.0 cPanel 11.22. systemctl restart apache2 Duplicate the AwStats default configuration file to one with your domain name. Copy AWStats example configuration file with new name and make changes as below. Its required to create an configuration file for each of your website for which statics need to generate. Using AWStats, you can view various stats 404, etc. awstats stopped when we transferred accounts. service httpd restart Step 5 Create AWStats Configuration File. AWStats is a powerful and featureful tool to analyze apache access logs.