1.实验原理:
客户端的请求会先到代理服务器,代理服务器根据自己的acl来判断是否去请求WEB服务器。如果请求WEB服务器,会在自己硬盘建立缓存,如果有下次同样的请求,会直接从自己的缓存来返回
2.具体操作:
/etc/squid/squid.conf内容:
http_port 3128
cache_mem 128 MB
cache_dir ufs /var/spool/squid 4096 16 256
cache_effective_user squid
cache_effective_group squid
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
visible_hostname squid_server
cache_mgr wangquannetwork@163.com
acl wang_acl src all
http_access allow wang_acl
本文详细介绍了如何利用Squid构建一个高效、内存优化的Web代理服务器,包括配置缓存策略、实现自定义acl等功能,旨在提高网络访问速度并减少服务器负载。

630

被折叠的 条评论
为什么被折叠?



