


Options ExecCGI -MultiViews +SymLinksIfOwnerMatch Alias /awstatsclasses "/usr/share/awstats/lib/"Īlias /awstats-icon/ "/usr/share/awstats/icon/"Īlias /awstatscss "/usr/share/doc/awstats/examples/css" These lines goes right before the closing VirtuaHost tag. 0 */6 * * * /usr/lib/cgi-bin/ -config=-update > /dev/nullįinally to be able to see the stats, add these lines for every virtual host you have, probably on each file on /etc/apache2/sites-enabled/ folder. You will need to add that line to the cronjob sudo crontab -eĪnd add this line for, and one per domain. Now that we have all prepared, it is time to run awstats for the first time: sudo /usr/lib/cgi-bin/ -config=-update You will need to make logrotate to rotate those logs. Those lines should go in the /etc/rc.local file. In this guide, we will walk you through the process of installing and configuring AWStats, a powerful Apache log analyzer, on a Fedora 16 Linux server. Operating System: Other (Include in body text). varnishncsa -m "RxHeader:^Host: -a -w /var/log/varnish/-D Awstats failures Ubuntu 18.04 Awstats failures Ubuntu 18.04. Run this command, one per virtual server.
#Awstats ubuntu how to
Thanks to my friend Riccardo I know how to split logs. Moved the settings into .conf Changed permissions of which updates stats and .conf to 777. Even though awstats can manage combined logs, it is better if the are splitted in one file per virtual server. Varnish uses an independent daemon to log visits, it is called varnishncsa and it will aggregated by default all hits to any virtual server on the same file.
#Awstats ubuntu install
Now we need to install the GeoIP perl module.

Locate those lines and make the looks like the above ones. Uncover valuable data to enhance your websites SEO and boost traffic. LoadPlugin="geoip GEOIP_STANDARD /usr/share/GeoIP/GeoIP.dat" Discover how to install and configure the robust Awstats keyword analytics tool on your Ubuntu 16.04 LTS system. CentOS Stream 9 CentOS Stream 8 Ubuntu 22.04 LTS Ubuntu 20. and Create one configuration file for each of them: sudo cp /etc/awstats/nf /etc/awstats/awstats.And: sudo cp /etc/awstats/nf /etc/awstats/awstats.Now edit each one of them, and change this lines (I will show you only data) LogFile="/var/log/varnish/SiteDomain="HostAliases="localhost 127.0.0.1" Ubuntu 12.04 LTS - WEB Server - Log analyzer - AWstats. I will assume you have two virtual hosts. If you want to log them, and analyze later you will have to make Varnish do the job instead of Apache.Īt the end of this tutorial you will have awstats installed, and analyzing logs for all your virtual hosts.įirst things first, lets install awstats (I will assume you already have Apache and Varnish configured and running) sudo apt-get install awstats If you run Varnish in front of Apache and PHP you will unload Apache a lot, and will improve you server hundreds of times.īut this have another effect, because now varnish is handling the load, Apache does not see the hits to your server, therefore it can not log the visits. Varnish is getting quite popular these days. Varnish logs analized with awstats | Multiple virtual servers
