Last time i posted configuring SqStat to monitor squid live traffic. It works perfect and userful as well so that you can monitor if any one is accessing unwanted sites that have been not included in your access list or to monitor an employee. But if you have lots of users and its quite difficult to identify him by simply looking at the ip quickly, Lets see how to resolve ip >> name and have SqStat show User name instead of IPs in the browser.
Thogh its a matter of adding couple of lines i found it was not working properly following the procedure given in their site. I done little workaround and made it work see how ..
Before doing this make sure SqStats installed properly and working fine. If don't have it installed see how to install & configure SqStat
First create a txt file with IP addresses followed by Usernames in SqStat directory on apache and name it hosts_file.txt (your desired name).
Now restart apache and check SqStat if its working or not.
gil ...
Thogh its a matter of adding couple of lines i found it was not working properly following the procedure given in their site. I done little workaround and made it work see how ..
Before doing this make sure SqStats installed properly and working fine. If don't have it installed see how to install & configure SqStat
First create a txt file with IP addresses followed by Usernames in SqStat directory on apache and name it hosts_file.txt (your desired name).
[root@apache]# cd /var/www/sqstat
[root@ns sqstat]# vim hosts_file.txt
192.168.1.112 User1
192.168.20.113 User2
192.168.20.114 User3
after creating the file update entry for hosts file in config.inc.php file, so that it could read and map ip >> usernames [root@ns sqstat]# vim hosts_file.txt
192.168.1.112 User1
192.168.20.113 User2
192.168.20.114 User3
[root@ns sqstat]# vim config.inc.php
/* proxy settings */
/* Squid proxy server ip address or host name */
$squidhost[0]="192.168.1.1";
/* Squid proxy server port */
$squidport[0]=3128;
$resolveip[0]=true;
$hosts_file[0]="hosts_file.txt"
$group_by[0]="host";
in the official procedure group_by is "username" but it doesn't work, so set it "host" but uncomment hosts_file and set resolveip to "true"/* proxy settings */
/* Squid proxy server ip address or host name */
$squidhost[0]="192.168.1.1";
/* Squid proxy server port */
$squidport[0]=3128;
$resolveip[0]=true;
$hosts_file[0]="hosts_file.txt"
$group_by[0]="host";
Now restart apache and check SqStat if its working or not.
gil ...
2 Comments
When I uncomment the $hosts_file[0]="hosts_file.txt" line
ReplyDeleteon website it shows internal server error and it stop working, as i again comment the line it again start working but only 0.0.0.0 ip address shows not users ip address
my all client enter proxy manually into their browsers.
please guide me how to fix this
kindly check the follwoing link which error shows on my page
ReplyDeletehttp://www.freeimagehosting.net/t/btcw2.jpg
internal server error 500