Quick start
Before we explore a configuration file in detail, let's have a look at the minimal configuration that you will need to get started. Get ready with the configuration file located at /opt/squid/etc/squid.conf
, as we are going to make the changes and additions necessary to quickly set up a minimal proxy server.
cache_dir ufs /opt/squid/var/cache/ 500 16 256 acl my_machine src 192.0.2.21 # Replace with your IP address http_access allow my_machine
We should add the previous lines at the top of our current configuration file (ensuring that we change the IP address accordingly). Now, we need to create the cache directories. We can do that by using the following command:
$ /opt/squid/sbin/squid -z
We are now ready to run our proxy server, and this can be done by running the following command:
$ /opt/squid/sbin/squid
Squid will start listening on port 3128 (default) on all network interfaces on our machine. Now we can configure our browser to use Squid as an HTTP proxy server with the host...