Step by step setting up a Squid Proxy server

Squid is used as a proxy cache server.It makes web responses faster,minimize bandwidth.
Couple of days ago,I had set up a local squid proxy server for our dev environment.The first step was to configure a standalone squid in my Mac OS X lion.

In this post I will write down the minimal steps and configuration for local Squid proxy service.

The steps are simple:

1.Update your network settings

2.Downlading Squid source

3.Compile and make it

4.Configure and start it!

Go to “System Preferences”=>”NetWork”=>”Advanced”(lower right corner)=>”Proxies”=> Select Web Proxy.

And set the “Web proxy Server” value as “localhost” and port is 3128(default port of squid)

Download the source form here
Extract it using

tar zxvf packagename.tar.gz

then cd package name” then configure it using

./configure -prefix=/usr/local/squid

compile using

make all

then intall it using

sudo make install

“for configuring the squid go to the

cd /usr/local/squid/etc

and open the squid.conf using

sudo mate squid.conf

I used Textmate as an editor,you can use your favorite text editor.
then you have to add the following configurations

# disk and memory cache settings
 cache_dir ufs /usr/local/squid/var/cache 500 16 256
 maximum_object_size 4096 KB


#access log and cache log settings
cache_access_log /usr/local/squid/var/logs/access.log
cache_log /usr/local/squid/var/logs/cache.log
pid_filename /usr/local/squid/var/run/


#assign your machine IP
acl allowed src
# Squid listening port
 http_port 8080

Then run the following commands

cd /usr/local/squid/sbin
 /.squid  -z

This command will create your all the swap directories.
And you need to change the permissions of the cache directories too.
Now time to start Squid using


Now,browse couple of pages and turn off your internet,then try to browse the pages again.

You can see the web pages and they are coming from cache.
That’s it.You can download my configuration file and change it as your settings. From here 
Hopefully in next post I will write down the steps how to configure Squid for a network and serving multiple computer as a Proxy server.

N.B:Please check the paths and change it accordingly for your installation directory.


  1. Virility Enhancer · April 8, 2013

    I wanted to send you the very little word so as to thank you once again for these nice tricks you have discussed on this page. It has been certainly incredibly generous of you to present freely all a number of people could possibly have advertised as an ebook in making some dough for themselves, and in particular since you could have done it if you ever desired. Those thoughts in addition acted to become a good way to be aware that someone else have similar keenness really like my own to figure out a good deal more in regard to this issue. I believe there are some more pleasurable times in the future for folks who find out your blog.

  2. Limousine · August 21, 2013

    I was suggested this web site by my cousin. I am not sure whether this
    post is written by him as no one else know such
    detailed about my difficulty. You are wonderful!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.