Pick a Free OS

User login

Navigation

Setting up Squid as your caching HTTP/FTP proxy

Lets use the most commonly available proxy server for Linux and the most

stable one around, Squid. Installing and configuring it is a breeze as

you'll soon find out. To make things simpler I would suggest that you get

the Squid RPM from any of the download on the net for your distro.The

latest Stable release of Squid is squid-2.3.STABLE1-5.i386.rpm. If you are

not able to find it on your distro's CD then i would suggest you try out

www.rpmfind.net. After having downloaded the RPM install it with the

following command.

Assuming you have downloaded the squid-2.3.STABLE1-5.i386.rpm release

the installation command is as follows.

bash# rpm -ivh squid-2.3.STABLE1-5.i386.rpm

And please do note that "bash#" stands for the shell prompt and you do not

need to replicate it in your command.

Having installed Squid sucessfully, now open the file /etc/squid.conf

using your favourite text editor. Some distributions put this file in

/etc/squid/. This is where it gets interesting and confusing too so read

carefully.

Scroll down till you come to the line

#http_port 3128

This option sets your HTTP proxy port to 3128 which is the default port

that squid runs on. You can uncomment this line and set it to whatever

port you want. It is advisable to avoid port 80 since, if you are running

a Web Server on the Linux machine Apache would be listening on that port.

Scroll down till you come to the line

#cache_mem 8 MB

This option sets a limit on the amount of memory that squid may make use

of to store it's transient and cached objects temporarily in memory. This

limit that you may impose on squid is the soft limit and at any given

point of time Squid may double or triple the size of occupied memory all

depending on the size and the requirement of in-transient cached objects.

Uncomment this line and change the size of your Memory cache from 8 MB to

what ever size you want it too be. Keep in mind the amount of RAM that you

have on your machine when you allocate memory to SQUID. But for your

knowledge this occupancy of the specified Memory Limit is dynamic.

Scroll down until you come to the following lines

# LOGFILE PATHNAMES & CACHE DIRECTORIES

#--------------------------------------------------------------------------

The following options are relative to setting up and tuning your web