首先下载squid for windows安装包 squid-2.7.STABLE5-bin.zip
然后解压缩,放到C盘squid目录内.
进入目录c:/squid/etc内,将所有文件的.default全部删掉
编辑下squid.conf,将所有内容删掉,替换以下内容,并保存
下面的配置文件,是可以加速一整台服务器的所有网站。acl all src 0.0.0.0/0.0.0.0
acl all src 0.0.0.0/0.0.0.0
cache_mem 1024 MB
cache_dir ufs c:/squid/var/cache 30000 16 256
http_access allow all
http_port 80 vhost
visible_hostname MY_CDN_Host_System
logformat combined %{20%y%m%d %H:%M:%S}tl,%>a,%{host}>h,%h,%{User-Agent}>h,%Ss:%Sh
acl localhost src 127.0.0.1
acl purge method PURGE
http_access allow purge localhost
http_access deny purge
access_log c:/squid/var/logs/access.log combined
refresh_pattern -i .php$ 1440 90% 129600 reload-into-ims
refresh_pattern -i .asp$ 1440 50% 2880 override-expire ignore-reload reload-into-ims
refresh_pattern -i .aspx$ 1440 50% 2880 override-expire ignore-reload reload-into-ims
cache_peer 8.8.8.8 parent 80 0 no-query originserver name=cdn1
cache_peer_domain cdn1 .com .net .cn .cc .me .org .biz .top .mobi .asia .tw .gov.cn .com.cn .hk .pw .tv .info .so .travel .la .tel .co .net.cn .org.cn |