Squid HTTP Proxy installation on Ubuntu Server

You can use Squid proxy instead of Apache on Ubuntu Server. To install and configure Squid on Ubuntu Server (and similar Debian-based Linux distributions), follow the steps below:

1.Install the Squid3 package:

sudo apt-get install squid3

2.Edit the Squid configuration file /etc/squid3/squid.conf and replace:

#cache_dir ufs /var/spool/squid3 100 16 256


cache_dir ufs /var/spool/squid3 3000 16 256 max-size=200000000


You can change the total cache size (3000 MB in the example) and the number of first-level sub-directories (16 in the example) and second-level sub-directories (256 in the example) in the cache directory.

Parameter max-size defines the maximum cached file size in bytes.

3.Stop the squid3 service.

sudo service squid3 stop
sudo squid3 –z

4.Edit the Squid configuration file again and add http_access allow all before http_access deny all to allow all clients to access the proxy.

5.Restart the squid3 service:

sudo service squid3 restart