SQUID PROXY SERVER

HMM, Now it is time to create a caching server using squid proxy open source project

sudo apt install squid

sudo systemctl enable --now squid

the configuration file is stored in /etc/squid

touk@ubuntu:/etc/squid$ tree
.
├── conf.d
│   ├── debian.conf
│   └── local.conf
├── errorpage.css
└── squid.conf

1 directory, 4 files

For simplicity, we’ll create our customize config file in conf.d, and as you can see i have local.conf file under the conf.d directory

touk@ubuntu:/etc/squid/conf.d$ cat local.conf
http_port 8080
cache_dir ufs /var/spool/squid 100 16 256

Here, I have setup squid to use port 8080, and use it as my caching server

ufs: i am using unified file system, you can specify the type of your file system like if it is ext4, xfs etc

this will work only for my local host because i need to create some acl and decide which clients will use it

sudo systemctl restart squid

circle-info

squid will use the default port 3128 by default ( other ports are in UNCONN state)

And sure enough, from the access logs i can see my caching is working perfect:

Last updated