Awstats is very crucial for website analysis and marketing.
It can generate user statistics from server log files. Web, streaming, ftp or mail server are supported.
It can show you number of visits, and unique visitors, visit duration.
display information about visitors (OS, browser, IP address, screen size, search engine, keyphrase and keywords used to find your website)
It works from command line and as CGI.
Let us explore installation of Awstats on Ubuntu with Apache.
1. Install Apache2 after updating. Then we need to install perl packages along with awstats.
# apt-get update
# apt install apache2
# apt install awstats libgeo-ip-perl libgeo-ipfree-perl
Awstats gathers website information from apache log file. Hence it is recommended to create new log file in virtual host configuration.
2. Once Awstats is installed, next step is to configure apache virtual host file.
# vim /etc/apache2/sites-available/example.com.conf
and add field
ErrorLog ${APACHE_LOG_DIR}/example.com_error.log
AccessLog ${APACHE_LOG_DIR}/example.com_access.log