squid反向代理配置文件

发布时间:2016-10-12 09:55:10 阅读:1025次
#http://blog.csdn.net/21aspnet/article/details/6605049
#http://hi.baidu.com/gyc800/item/c4a8fbcfa92c1b3d45941630
http_port 127.0.0.1:3128 accel vhost vport
#
acl OverConnLimit maxconn 16
http_access deny OverConnLimit
#
acl Manager proto cache_object
acl Localhost src localhost
http_access allow Manager Localhost
http_access deny Manager
#
visible_hostname 127.0.0.1
cache_mgr test115@me.com
#
cache_effective_user proxy
cache_effective_group proxy
tcp_recv_bufsize 65536 bytes
cache_peer 127.0.0.1 parent 88 0 no-query originserver 
#这里作为客户机的192.168.6.103,他访问的是192.168.6.100,实际上访问的是192.168.99.232的内容,但是它并不能够直接访问192.168.99.232,不是同一个网段
#这里用域名与ip一样的,可能一个ip多个域名
#这行是关键阿!网上很多都是2.5的配置,而2.6已经不适用那些配置了
#icp_port 0
acl test src all
http_access allow test
cache_dir ufs /usr/local/squid3/cache/ 1024 1 1 
#为了调试方便,目录结构设置的相当简单,实际应用要多建一些
cache_store_log /usr/local/squid3/store.log
cache_log /usr/local/squid3/cache.log
debug_options ALL,1 33,2 #如果需要调试开这行
httpd_suppress_version_string on #去掉squid的版本号


refresh_all_ims off 
refresh_pattern -i .html 10 90% 2160 ignore-reload
refresh_pattern -i .css 10 90% 2160 ignore-reload
refresh_pattern -i .shtml 10 90% 2160 reload-into-ims
refresh_pattern -i .htm 10 90% 2160 reload-into-ims
refresh_pattern -i .gif 60 90% 2160 reload-into-ims
refresh_pattern -i .swf 60 90% 2160 reload-into-ims
refresh_pattern -i .jpg 60 90% 2160 reload-into-ims
refresh_pattern -i .png 60 90% 2160 reload-into-ims
refresh_pattern -i .bmp 60 90% 2160 reload-into-ims
refresh_pattern -i .js 10 90% 2160 ignore-reload

acl managercache src 117.144.207.114 127.0.0.1
acl PURGE method PURGE
http_access allow managercache PURGE
http_access deny PURGE
#purge squid cache
#root@test2007:/var/www/html/phpjx/css# squidclient -p 80 -h localhost -m PURGE http://www.phpjx.com/css/style.css

如有问题,可以QQ搜索群1028468525加入群聊,欢迎一起研究技术

支付宝 微信

有疑问联系站长,请联系QQ:QQ咨询
下一篇:mysql配置文件

转载请注明:squid反向代理配置文件 出自老鄢博客 | 欢迎分享