In the articles: Installation and configuration of the Internet gateway on Debian Part 1 and Installation and configuration of the Internet gateway on Debian Part 2 We installed squid, sams, rejik.
Now we move on to installing and configuring a real-time squid proxy server download viewer. Sqstat
Sqstat A program written in PHP language. For its operation, a web server with php support is required on the server.
According to this instruction, the web server and php have already been installed, the proxy server squid is configured.
We have to download, install and configure the sqstat program and configure the web server.
Download the program at the link:
http://samm.kiev.ua/sqstat/sqstat-1.20.tar.gz
or a team:
wget http://samm.kiev.ua/sqstat/sqstat-1.20.tar.gz
Next, create a folder in the web server directory, unload the downloaded archive and transfer the contents of the archive to the created folder using commands:
mkdir -p /var/www/sqstat/ tar xvfz sqstat-1.20.tar.gz mv sqstat-1.20/* /var/www/sqstat/
Let's go into the file. /var/www/sqstat/
cd /var/www/sqstat/
Create a configuration file with the command:
cp config.inc.php.defaults config.inc.php
The configuration file for our system is already fully operational, but if you want to see through the browser not downloading IP and usernames, you need to create a file in this folder. hosts.txt team
touch hosts.txt
and enter a list of users in the format
# отдел № 1 192.168.0.10 Фамилия Имя Отчество
In statistics, when a person from this IP pumps, will not be displayed IP 192.168.0.10, and Surname Name Patrolny
If this is not necessary, then leave the setting standard and proceed to configure the web server.
If such a need exists, edit the configured file by opening it with the team.
mcedit config.inc.php
find and correct the line
was:
//$hosts_file[0]="hosts.txt"
became:
$hosts_file[0]="hosts.txt";
We also change the file name by the team.
mv sqstat.php index.php
We grant rights to the folder and all contents for the web server:
chown -R www-data:www-data /var/www/sqstat/
Configure the Apache2 web server
Add to the end of the Apache2 configuration file settings for the folder where our program is located /var/www/stats team
echo '
<Directory "/var/www/stats">
AllowOverride All
</Directory>
' >> /etc/apache2/apache2.confAfter that, you need to restart the web server with the command:
/etc/init.d/apache2 restart
Open our online statistics page at the address http://ip/sqstat And we see where you're going and where you're sitting.
We move on to the final part of our instructions - to install and configure the arno-iptables-firewall firewall.




comment