How to configure squid for CDN in Windows

Source: Internet
Author: User

Note that the computer on which you pre-install and configure squid must be connected to the network. The system version is Windows 2000/XP/2003/Server 2003.

1) first download squid for Windows Version (http://www.jb51.net/softs/43599.html), as follows (ZIP file name: squid-2.7.STABLE4-bin.zip), you can download this file to the desktop, so you can find the operation.

Squid is a famous agent server software under Linux/Unix, many commercial version of the agent server is based on squid development: http://www.squid-cache.org/products.html
Recently only occasionally found that squid also had for Windows Version: http://www.acmeconsulting.it/SquidNT/download.html
Although this version is not officially released by the Squid Project for Windows, it can be seen from the release records that the maintainer of this version is still very responsible. If you want to build a proxy server on Windows, try it out.
Http://squid.acmeconsulting.it/download/squid-2.7.STABLE4-bin.zip
2. Extract the downloaded ZIP file (squid-2.7.stable4-bin.zip) to the root directory of drive C. Right-click the file and select the extract to squid-2.7.STABLE4-bin command to generate a squid folder in the root directory of drive C. In this way, squid for Windows is "installed" on your computer. Note: Do not change the path and folder name as much as possible. Put it in the root directory of the C drive. Do not change the folder name, that is, squid. Because squid for Windows is installed at c: \ Squid by default, everyone should be cautious about this. If you want to modify the path and folder name, You have to modify many configurations in Squid, which is quite troublesome.
3) Start-run-cmd. Open the window and press the doscommand line to enter the command.

After testing, you can copy squid. conf and mime. conf in c: \ squid \ etc \, and put them in the root directory to indicate that the configuration file cannot be found.

4) Close the DOS window and return to the desktop. Go to my computer-drive C, double-click to open the squid folder, double-click to open the squid. conf file, and edit the configuration of this file. Press Ctrl + F, enter ACL safe_ports port 777, and press Enter. Press Enter next to # multiling HTTP and add a space. The written content is shown in.


5) press Ctrl + F and enter http_access deny connect. Press enter to find the content. After ssl_ports, press enter to add two blank lines. For more information, see.

6) Find the # cache_mem 8 Mb sentence and delete the previous # number to change the default 8 to the required size. The value here depends on the available memory of the specific machine, the maximum size should be set as much as possible to improve the performance of the proxy server, but the cache size of the proxy server cannot affect the performance of the machine. As shown in.

7) set the hostname. Please follow the procedure.

8) press Ctrl + S to save and edit the squid. conf file, and then close it.
9) Start-run-CMD and enter the following three commands.
Cd c: \ squid \ sbin \
Squid-I
Squid-z
Squid
10) the configuration is complete.

Here, the squid part is successfully set up.

The above supplement:

Install squid acceleration proxy website on Windows

Download Windows squid

Download and decompress the package to c: \ squid

C: \ squid \ etc \ squid. conf is as follows

CopyCode Code: # locally bound IP Port
Http_port IP: 80 vhost
Visible_hostname localhost
Cache_dir ufs c:/squid/cache 1024 16 256
Cache_mem 100 MB
# Proxy IP address and port
Cache_peer IP address parent 80 0 no-query originserver Weight = 1 name =
Cache_peer IP address parent 80 0 no-query originserver Weight = 1 name = B
# Accelerating two sites
Cache_peer_domain A www.aaa.com
Cache_peer_domain B www.bbb.com

ACL all SRC 0.0.0.0/0.0.0.0
Http_access allow all
Cache_peer_access A allow all
Cache_peer_access B allow all
Tcp_recv_bufsize 65535 bytes

Cache_mgr phpsir@qq.com
Icp_port 0

C: \ squid \ etc \ mime. conf. Default copy to mime. conf

Create cache directory
C: \ squid \ sbin \ squid-z
Install as a service
C: \ squid \ sbin \ squid-I
Start the service
Net start squid

Domain name resolution is started below.
Open the directory c: \ windows \ system32 \ drivers \ etc
Use NotePad to open hosts and edit and save
61.174.63.74 cdn.jb51.net cdn.jb51.cn
(This IP address is the IP address of your master server, not the IP address of the CDN server)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.