This article will explain what a proxy server is and will then go ahead to explain how to parse squid access.log files using Squid Analyzer.
Squid is a caching proxy that accepts requests for URLs for the client and returns them. Proxies work well in network environments that do not have direct access to the internet. Where clients do not have direct access to the internet but still need to view web pages, the proxy program reduces bandwidth utilization and increases the rate of response times by caching and reusing frequently requested web pages. Since the early 90s squid has been used by ISP to reduce latency and increase faster download speeds.
The proxy program has extra access controls that makes it a great server accelerator. It has the ability to act as a load-balancer.
squid analyzer is a program that parses the raw access.log file and generates general statistics of hits, bytes-usage, url, and users. It generates great graphic reports.
squid analyzer depends on perl, download the latest programs of perl and squid analyzer and install.
sudo apt-get install perl
sudo yum install perl
tar zxcf squidanalzyzer-5.2.tar.gz
Alias /squidreport /var/www/squidanalyzer
Options -Indexes FollowSymLinks MultiViews AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.1
service httpd restart
# Erase squid cache
01 0 * * 6 /root/clear_cache_squid.sh
# Squid Analyzer
# Run everyday at 6.00 AM
0 2 * * * /usr/local/bin/squid-analyzer > /dev/null 2>&1