After setting up my squid proxy for web caching, I was trying to see if it supports http compression. But the version which I had installed doesn’t support webcache compression. Google gave me ViCompress .
Here is what www.visolve.com says about ViCompress ..
“ViCompress HTTP proxy server reduces download time by gzip compressing text pages before sending them on the client. This results in faster download times, especially over slow network connections. ViCompress works with existing web servers and web browsers. All modern browsers (Internet Explorer, Firefox, Safari, Chrome) recognize gzip-encoded data, and will automatically decompress the data on the fly. Also, ViCompress can compress both static and dynamic web pages, including Apache/PHP, Microsoft ASP pages, Perl CGI scripts, and others”
Steps to setup ViCompress:
Download ViCompress rpm from visolve.com
Install the package (rpm -ivH ViCompress-1.1.0-1.i386.rpm).
This installs in /usr/local/vicompress/
Edit the configuration file for the proxy port number and other values.
opensuse:~ # cat /usr/local/vicompress/etc/vicompress.conf
# Vicompress configuration file
listen 0.0.0.0 8081 # IP address and port to listen on
outgoingip 0.0.0.0 # IP address to bind to for outgoing connections
enable_sessions yes # Enable sticky sessions with multiple webservers
enable_compression yes # Enable compression of html/text pages
enable_caching yes # Enable caching of web pages/images
cache_memory 200 # Amount of memory used for cache, in Megabytes
max_cacheditem_size 512 # Max size of cached items, in kilobytes
cache_expires 240 # How long a cached page is valid (in hours)
enable_dns_caching yes # Enable caching of dns lookups
dns_expires 48 # How long cached dns lookups are valid (in hours)
user nobody # User to run server as
rotatesize 100 # Size (in megabytes) at which to rotate log files
logformat squid # Format of access log. Either apache or squid
enable_debug no # Enable debug messages in the errorlog
accesslog /var/log/vicompress/accesslog # Access log file path
errorlog /var/log/vicompress/errorlog # Error log file path
errorpage /usr/local/vicompress/etc/errorpage.html # HTML page for errors
logstats /usr/local/vicompress/logstats # Log statistics directory
Tune the network parameters of the kernel by using the script given by vicompress. This tunes the network parameters like rmem_max, wmem_max, tcp_rmem, tcp_wmem .
opensuse:~ # /usr/local/vicompress/bin/tune_kernel.sh
Start the vicompress compression enabled web cache proxy server.
opensuse:~ # /usr/local/vicompress/bin/vicompress.sh start
/usr/local/vicompress/bin/vicompress.sh start: vicompress started
On the client browsers, change the proxy and check the speed of compression enabled browsing.
vicompress also provides reporting collected by the command