How to configure squid to do CDN's concise diagram _win server under Windows system

Source: Internet
Author: User
First of all, you have to install the squid on this computer must be in 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), Download the following address (zip file name: squid-2.7.stable4-bin.zip), you can download this file to the desktop, so good operation.

Squid is the Linux/unix of the well-known proxy server software, many commercial versions of the proxy server are based on squid development: http://www.squid-cache.org/products.html
It's only recently that squid occasionally has a for Windows version: http://www.acmeconsulting.it/SquidNT/download.html
Although this version is not an official for Windows version of the Squid project, it can be seen from the release record that this version of the maintainer is responsible. Students who want to build a proxy server under the Windows platform may wish to try it.
Http://squid.acmeconsulting.it/download/squid-2.7.STABLE4-bin.zip
2 This step is to extract the file, just download the zip file (squid-2.7.stable4-bin.zip) back to the root of C disk, and then click on the file on the right mouse button, select "Extract to Squid-2.7.stable4-bin" command, You can generate a Squid folder in the C-packing directory. In this case, the Squid for Windows version is "installed" on your computer. Note: Try not to modify the path and folder name, as far as possible in the C packing directory, folder name do not change, called squid, because squid for Windows default installation location is C:\squid, this point we should be cautious. If you want to modify the path and folder name then you have to modify the squid inside a lot of configuration, quite troublesome.
3 Start-run-cmd, after opening the window, press the image below to enter the command at the DOS command line.



after testing in fact directly copy a copy of squid.conf and mime.conf in C:\squid\etc\ on it, put in the root hint can not find the configuration file.

4 Shut down the DOS window and return to the desktop. Enter My Computer-C disk, double hit Open squid folder, double hit open squid.conf file, the file for configuration editing. Press Ctrl+f to enter the ACL safe_ports Port 777, carriage return. Then press ENTER after the # multiling HTTP, adding a space, which is written as shown in the following figure.


5) and then press CTRL+F input http_access deny CONNECT, enter, find the contents of the search. After Ssl_ports, press ENTER to add 2 blank lines, please see the image below.



6 Find # Cache_mem 8 mb This sentence by deleting the previous # will be the default of 8 to the size required, where the value should be based on the specific machine available memory, should be in memory allowed to set as much as possible to improve proxy server performance, However, you cannot let the proxy server's cache size affect the performance of this machine. The following figure can be manipulated.



7) Set the hostname, please click the following figure operation.



8) Press Ctrl+s to save the edits to the squid.conf file, and then close it.
9 Start-run-cmd and enter the following 3 commands.
CD c:\squid\sbin\
Squid-i
Squid-z
Squid
10) configuration complete.

Here, the squid part is built successfully.

The above supplement:

Install Squid Acceleration Agent website above windows

Windows squid download

Download Extract to C:\squid

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

Copy Code code as follows:

#本地绑定的IP端口
Http_port ip:80 Vhost
Visible_hostname localhost
Cache_dir UFS c:/squid/cache 1024 16 256
Cache_mem MB
#代理的IP地址和端口
Cache_peer IP Address parent 0 no-query originserver weight=1 name=a
Cache_peer IP Address parent 0 no-query originserver weight=1 name=b
#加速两个站点
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 copied into mime.conf

Create cache Directory
C:\squid\sbin\squid-z
Install into service
C:\squid\sbin\squid-i
Start a service
net start squid


The following begins to do domain name resolution.
Open Directory C:\WINDOWS\system32\drivers\etc
Open hosts Edit and save with Notepad
61.174.63.74 cdn.jb51.net cdn.jb51.cn
(This IP refers to your primary server IP, not the CDN machine IP)

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.