Ubuntu 13.04
Sponsored Link

Log Analyzer - Visitors
2013/05/12
 
Install Visitors that is Apache Log analyzer.
[1] Install Visitors
root@www:~#
aptitude -y install visitors graphviz
root@www:~#
mkdir /var/www/visitors

root@www:~#
vi /etc/apache2/sites-available/default
# add these lines

      <Location /visitors>
            Order Deny,Allow
            Deny from all
            Allow from 10.0.0.0/24
# IP address you allow

      </Location>

</VirtualHost>
root@www:~#
/etc/init.d/apache2 restart

* Restarting web server apache2
... waiting ...done.
# generate a report

root@www:~#
visitors -A /var/log/apache2/access.log -o html > /var/www/visitors/index.html

--
101 lines processed in 1 seconds
0 invalid lines, 0 blacklisted referers
# generate a page-visiting report

root@www:~#
visitors -A -m 30 /var/log/apache2/access.log -o html --trails --prefix http://www.srv.world > /var/www/visitors/trails.html

--
101 lines processed in 1 seconds
0 invalid lines, 0 blacklisted referers
# generate a page visiting image

root@www:~#
visitors /var/log/apache2/access.log --prefix http://www.srv.world -V > /var/www/visitors/graph.dot

--
101 lines processed in 1 seconds
0 invalid lines, 0 blacklisted referers
root@www:~#
dot -Tpng /var/www/visitors/graph.dot > /var/www/visitors/graph.png

[2] Access to 'http://(your server's name or IP address)/visitors/', then following screeen is shown and it's possible to see Apache's logs.
  ⇒ http://(your server's name or IP address)/visitors/graph.png
Matched Content