Configure Squid
Add and modify parameters using a text editor like Notepad++ to configure Squid for your environment. You will need to stop and start Squid to activate the changes.
You cannot use a configuration file from an earlier Squid version as it is not compatible with 3.5.x.
Stop the proxy server using the Squid system tray icon right-click menu.
-
Open the Squid Folder using the Squid system tray icon right-click menu.
-
Open \etc\squid\squid.conf in Notepad ++ or similar text editor.
-
Add the lines below to the top of the file. They are parameters for setting up basic authentication in Squid.
# Squid for windows with or without Authentication
auth_param basic program C:\Squid\lib\squid\basic_ncsa_auth.exe C:\Squid\etc\squid\.htpasswd
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive on
acl basic_port myport 3128 acl basic proxy_auth REQUIRED acl none_port myport 8080
http_access allow none_port http_access allow basic basic_port http_access deny all
-
Make sure the file paths in the auth_param basic program line match your install directory. They point to the authentication helper program and the .htpasswd file you will create later.
-
Under # Squid normally listens to port 3128, add http_port 8080 directly below http_port 3128. 8080 is a listener port commonly used by proxy servers.
-
Uncomment (remove the #) from the line #cache_dir aufs/cygdrive/d/squid/cache 3000 16 256 and change the path to point to the cache folder (c:/squid/var/cache). This enables disk caching, reducing the network load for low-bandwidth remote locations.
You must create a Squid caching structure in the cache folder for this to work. We will do that in Step 4: Create the Squid caching folder structure.
-
At the very bottom of the file, add and set the maximum_object_size parameter. Without it, Squid, by default, will only cache files up to 4 MB in size.
-
Save the file.
Note that
-
Your changes do not take effect until you restart the proxy server.
-
Squid offers more configurable options than are visible in the squid.conf file provided by Diladele B.V. See the Squid configurationfile documentation for more information.
-
Option descriptions can also be found in c:\Squid\etc\squid\squid.conf.documented (open in Notepad ++ or similar text editor).
-
Update your HOSTS file in c:\Windows\System32\drivers\etc\ as required. For example, with the proper Hostname and IP Address pair for the Global Subscription Service (GSS).
-
Copy it to c:\Squid\etc\squid.
If you do not want to use the HOSTS file method, you can change the default DNS name servers in the squid.conf file: