vnStat PHP Frontend - Install & Config Webinterface for vnStat

March 17, 2008 · Filed Under vnStat Bandwidth Monitoring 


B. Dijkstra at SQWEEK.com has written a simple PHP web frontend for vnStat. The latest stable version is 1.3 and is available for download here

vnStat PHP Frontend requires

Apache Webserver (use Apache2.2.3 here)

PHP (use PHP5.2.0-8)

GD Image librariesvnStat already installed

So lets get the prerequisites install.

Install PHP5

DebianSystem# aptitude install php5

Install GD Image Libraries

DebianSystem# aptitude install php5-gd

Install Apache2 Webserver

DebianSystem# aptitude install apache2

Now, the pre-requisites are installed. You need to have a functional vnStat running on the system. For install instructions click here

Download vnStat PHP Frontend

Download the vnStat PHP Frontend from here

DebianSystem# wget http://www.sqweek.com/sqweek/files/vnstat_php_frontend-1.3.tar.gz

Unzip & Untar the files

DebianSystem# tar -zxvf vnstat_php_frontend-1.3.tar.gz

Move the files to Apache Webserver Root

DebianSystem# mv vnstat_php_frontend-1.3 /var/www/vnstat

Edit Config file for the Interfaces

DebianSystem# vi config.php

Look for

$iface_list = array(’eth0′);

and

$iface_title['eth0'] = ‘Internal’;
//$iface_title['eth1'] = ‘Internet’;
//$iface_title['sixxs'] = ‘SixXS IPv6′;

and alter it to your systems requirement acfordingly (say change name of interfaces or add multiple interfaces)

Example

$iface_list = array(’eth0′ , ‘eth1′);

Now, that all is done, simply access the site and you can see the vnStat stats with graphs that you would otherwise see only in console.

Comments

Leave a Reply