Regarding squid, the Good VPS Tribe gave a brief introduction and simple configuration under Linux last month ( reviewed the previous ...). I recently played with windows and found squidInstallation and configuration under windows are also very convenient, even more intuitive than Linux. Today, we will share the squid installation and proxy configuration under the windows system.

Before we start, let's assume that our proxy server is A, and the real backend server is B. We need to use A server to proxy B server.
Of course, no settings are required on server B. All we need to do is install and deploy Squid on server A.
The installation of Squid on Windows is very simple. Just download the package and put it in Windows. There is not even the setup and next of our common software under Windows, quack.
Squid download address: http://squid.acmeconsulting.it/index.html
Download the appropriate version at the above address. The latest version is 3.0, although the For NT/2003 version is listed on the page. No. 2.5, but I tried to use v2.7 in Windows 2003 and it worked fine. The latest version has not been tested. In addition, some websites indicate that it cannot coexist with IIS in Windows 2003. This has not been tested because the Burst VPS I am using has uninstalled IIS before.
Okay, let’s get down to business. Access the downloaded squid folder to the C: directory (you can also put it in other partitions, here I put it directly on the C drive for convenience).
1. Rename squid.conf.default, mime.conf.default, cachemgr.conf.default, squid_radius_auth.conf.default in the c:squidetc directory (remove the .default at the end)
2. Edit Squid configuration file (in the etc directory, we renamed squid.conf in the previous step). Here I will mainly explain the process. The configuration of Squid is a very interesting thing. Here I will only make a simple configuration. As long as you can be an agent.

visible_hostname localhost
#Set the host name of Squid. Without this item, Squid will not be able to start
http_port 80 accel vhost vport
#Set Squid to accel acceleration mode. I used port 80 directly, vhost must be To add. Otherwise, the host header will not be forwarded to the back-end server, and an error that the host header cannot be found will appear during access.
cache_peer localhost parent 80 0 no-query originserver name=localhost
#Define different parent nodes , set the nodes to no-query and originserver to indicate that these nodes are actual servers
cache_peer_domain localhost
#Set different domain names to be forwarded to different cache_peers. Without this, domain names with different domain names may be distributed to the same server. On this server.
acl all src 0.0.0.0/0.0.0.0
http_access allow all

Please modify the above configurations according to your own situation, or you can customize the configuration yourself
3. Install and start Squid
in Windows. Start, run, CMD, and enter the command line.

c:>cd c:squidsbin       #Enter squid
C:squidsbin>squid –i        #Register squid as a Windows service
C:squidsbin>squid –z     #Generate cache directory
C:squidsbin>net start squid< x2>   #Start squid

The above can also be started and stopped in the Windows menu, management tools, and services. After the above steps, if the startup is successful, we can modify the local hosts file to test whether it is feasible. After testing on Burst's windows VPS, the proxy backend and cache can be perfectly matched.
We can also view some information in the squid directory at any time, such as the cache directory c:squidvarcache, the configuration file directory c:squidetc, the log directory c:squidvarlogs, etc.


Hong Kong/United States/Domestic High Speed ​​VPS

postid
20454

Leave a Reply