Pick a Free OS

User login

Navigation

Setting up Squid as your caching HTTP/FTP proxy

cache. So lets get gunning pals. Here the first and most important one.

#cache_dir /var/squid/cache 100 16 256

Isn't this getting a little confusing, one parameter and three values to

it! C'mon let's demystify the whole thing. The values given here are the

values the Squid will use by default. So if the 'cache_dir' option isn't

implicitly mentioned then Squid resolves to maintaining the cache in

/var/squid/cache. Uncomment this option 'cache_dir' if you want to

customize the parameters.

The first parameter '/var/squid/cache' is the path to the cache files. You

may change this to suit whatever you want too, but remember whatever path

you may mention out here make sure that those directories exist because

Squid will never create the directories on it's own. Also a point to be

noted is that the directories should be writable by the Squid process. If

you are a novice and all of this is sounding too geekish then I suggest

you stick to the default values.

The next value '100' is the amount of space in MegaBytes(MB) that Squid

can utilize to store the cache contents. Modify this to whatever you think

is appropriate to suit your needs.

The next value referred to as 'Level-1' is the number of sub-directories

that Squid can create under the current Cache directory. I suggest that

for starters leave this as it is.

The next option is referred to as 'Level-2' is the number of Second Level

directories that Squid can create under each 'Level-1' directory. The

default is fine for the moment.

Scroll down till you come to the line:

# ACCESS CONTROLS

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

The following lines define Access Control Lists for your Network. Squid

allows you to define various kinds of ACL's out here. So make it a point

to read this whole section of Access Controls carefully.

In this "ACCESS CONTROLS" section scroll down till you come to the

following lines.

#Default configuration:

http_access allow manager localhost

http_access deny manager

http_access deny !Safe_ports

http_access deny CONNECT !SSL_ports

#

# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR

# CLIENTS

#

http_access deny all

What you need to do out here, is to setup your own ACL's (Access Control

Lists), else just comment out the last line as shown above and put the

following line in.

http_access allow all