1.配置squid.conf
http_port 80
cache_mem 32 MB
cache_swap_low 90
cache_swap_high 95
maximum_object_size 4096 KB
cache_dir /var/spool/squid 100 16 256
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
cache_dns_program /usr/lib/squid/dnsserver
dns_nameservers 192.168.2.32
unlinkd_program /usr/lib/squid/unlinkd
acl all src 0.0.0.0/0.0.0.0
acl allow_ip src 192.168.2.1/255.255.255.0
acl manager proto cache_object
acl localhost src 192.168.2.32/255.255.255.255
acl SSL_ports port 443 563
acl Safe_ports port 80 21 443 563 70 210 1025-65535
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access allow allow_ip
cache_effective_user squid
cache_effective_group squid
下面两个选项是用来定义squid加速模式的。用virtual来指定为虚拟主机模式。80端口为要加速的请求端口。采用这种模式时,Squid就取消了缓存及ICP功能,假如需要这些功能,必须设置httpd_accel_with_proxy选项。
httpd_accel_host virtual
httpd_accel_port 80
更多内容请看代理服务器技术专题、FTP服务器、双核服务器技术专题,或进入讨论组讨论。
相关专题
- Exchange安装因错误0x80070422失败 (0次浏览)
- Exchange 2007中如何授予邮箱的代理发送权限 (0次浏览)
- 分析刀片与机架式服务器的选择问题 (0次浏览)
- 如何增强Exchange服务器的安全性 (0次浏览)
- 微软Windows试水高端企业级服务器市场 (0次浏览)
- XML入门教程:服务器上的XML (0次浏览)
- Ubuntu用Apache2管理Subversion控制系统 (0次浏览)
- 搭建Exchange2007企业邮箱系统方案 (0次浏览)
- 服务器虚拟化的价值以及存在的问题 (0次浏览)
- SENDMAIL邮件服务器的安装与设置 (0次浏览)



