squid配置文件一例,只使用了web cache功能,用来给web加速。

http_port 80 defaultsite=IP
icp_port 0
cache_peer ip parent 85 0 no-query originserver
hosts_file /etc/hosts
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
cache deny QUERY
acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
cache_mem 2000 MB
cache_swap_low 90
cache_swap_high 95
maximum_object_size 4096 KB
maximum_object_size_in_memory 1024 KB
cache_dir ufs /var/spool/squid 10000 64 256
emulate_httpd_log on
logformat combined %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %Hs %<st "%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh
access_log /var/log/squid/access.log combined
cache_log none
cache_store_log none
refresh_pattern ^ftp: 10 20% 20
refresh_pattern ^gopher: 10 0% 20
refresh_pattern . 0 20% 20
refresh_pattern -i .html 10 100% 20 reload-into-ims
refresh_pattern -i .shtml 10 100% 20 reload-into-ims
refresh_pattern -i .htm 10 100% 20 reload-into-ims
refresh_pattern -i .gif 10 100% 20 reload-into-ims
refresh_pattern -i .swf 10 100% 20 reload-into-ims
refresh_pattern -i .png 10 100% 20 reload-into-ims
refresh_pattern -i .bmp 10 100% 20 reload-into-ims
refresh_pattern -i .css 10 100% 20 reload-into-ims
refresh_pattern -i .jpg 10 100% 20 reload-into-ims
refresh_pattern -i .txt 10 100% 20 reload-into-ims
refresh_pattern -i .rhtml 10 100% 20 reload-into-ims
refresh_pattern -i .xml 10 100% 20 reload-into-ims
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl to_servers dst IP
acl Safe_ports port 80
acl OverConnLimit maxconn 8
http_access deny OverConnLimit
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access allow to_servers
http_access deny all
http_reply_access allow all
icp_access allow all
visible_hostname cache15
cache_mgr admin@jbxue.COM
redirect_rewrites_host_header off
half_closed_clients off
allow_underscore on
pid_filename /usr/local/squaid/var/logs/squid.pid
logfile_rotate 10
coredump_dir /var/spool/squid
本文原始链接:http://www.jbxue.com/article/2176.html

分享一个不错的squid 配置文件的更多相关文章

  1. 分享一个不错的Unittest测试报告

    分享一个不错的,unittest测试报告. 先上图: 代码如下: 复制下来保存成py可用 #coding=utf-8 """ A TestRunner for use w ...

  2. [置顶] ios 一个不错的图片浏览分享框架demo

    demo功能:一个不错的图片浏览分享框架demo.iphone6.1 测试通过.可以浏览图片,保存,微博分享到新浪,腾讯,网易,人人等. 注:(由于各个微博的接口有时候会有调整,不一定能分享成功.只看 ...

  3. 分享一个好用的tmux配置文件

    tmux众所周知,不过多介绍,友好的tmux配置,让人用起来很舒服,分享一个tmux配置文件 # ------ general ------------------------------------ ...

  4. linux中内核的一个不错的参数somaxconn

    导读:在linux中,/proc/sys/net/core/somaxconn这个参数,linux中内核的一个不错的参数somaxconn 看下其解析: 对于一个TCP连接,Server与Client ...

  5. 分享一个c#写的开源分布式消息队列equeue

    分享一个c#写的开源分布式消息队列equeue 前言 equeue消息队列中的专业术语 Topic Queue Producer Consumer Consumer Group Broker 集群消费 ...

  6. 【开源.NET】 分享一个前后端分离的轻量级内容管理框架

    开发框架要考虑的面太多了:安全.稳定.性能.效率.扩展.整洁,还要经得起实践的考验,从零开发一个可用的框架,是很耗时费神的工作.网上很多开源的框架,为何还要自己开发?我是基于以下两点: 没找到合适的: ...

  7. 分享一个开源的网盘下载工具BaiduPCS-Go

    大家在使用网盘的时候,一定忍受不了限速下载的速度.今天给大家分享一个开源的网盘下载项目BaiduPCS-Go.Go语言编写,仿 Linux shell 文件处理命令的百度网盘命令行客户端.多平台支持, ...

  8. 【微信支付】分享一个失败的案例 跨域405(Method Not Allowed)问题 关于IM的一些思考与实践 基于WebSocketSharp 的IM 简单实现 【css3】旋转倒计时 【Html5】-- 塔台管制 H5情景意识 --飞机 谈谈转行

    [微信支付]分享一个失败的案例 2018-06-04 08:24 by stoneniqiu, 2744 阅读, 29 评论, 收藏, 编辑 这个项目是去年做的,开始客户还在推广,几个月后发现服务器已 ...

  9. 分享一个SQLSERVER脚本(计算数据库中各个表的数据量和每行记录所占用空间)

    分享一个SQLSERVER脚本(计算数据库中各个表的数据量和每行记录所占用空间) 很多时候我们都需要计算数据库中各个表的数据量和每行记录所占用空间 这里共享一个脚本 CREATE TABLE #tab ...

随机推荐

  1. STL 源代码剖析 算法 stl_algo.h -- partial_sort / partial_sort_copy

    本文为senlie原创,转载请保留此地址:http://blog.csdn.net/zhengsenlie partial_sort / partial_sort_copy ------------- ...

  2. netsh学习

    show allowedprogram –显示被允许的程序配置 show config - 显示防火墙的配置 show currentprofile -显示 Windows 防火墙的当前配置文件. s ...

  3. OpenERP的短信(SMS)接口

    今天测试了一下OpenERP的短信(SMS)接口. 在OpenERP的Partner界面上,WebClient的右边的工具条有个“send sms”的按钮.OpenERP中发短信用的是短信的Web接口 ...

  4. sqlserver 创建对某个存储过程执行情况的跟踪

    有时候需要抓取执行存储过程时某个参数的值,有时候程序调用存储过程执行后结果不太对,不确定是程序的问题还是存储过程的问题,需要单独执行存储过程看结果 即可用下面的方法 --=============== ...

  5. 【转】Html.RenderPartial与 Html.RenderAction的区别

    Html.RenderPartial与Html.RenderAction 这个两个方法都是用于把MVC用户控件嵌入到View中. Html.RenderPartial是直接将MVC用户控件嵌入到界面上 ...

  6. 杀戮天使(Angels of Death)无删减版 高清下载

      Created by Marydon on 已完结 免责声明 本人所提供的资源搜集于网络,仅供学习交流使用,不得进行任何商业及非法用途,由此产生的一切后果将由使用者本人承担: 本人仅仅提供一个观摩 ...

  7. Python画图matplotlib展示图中中文乱码

    在用python的 matplotlib 画图的时候,在图表上面有中文乱码问题,如下的: 解决过程: 平台:windows,python2.7步骤一:打开设置文件 import matplotlib ...

  8. 腾讯云-搭建 Python 开发环境

    搭建 Python 开发环境 准备工作 任务时间:5min ~ 10min Python是一种解释型.面向对象.动态数据类型的高级程序设计语言.首先我们来看看系统中是否已经存在 Python ,并安装 ...

  9. 微信小程序Tab选项卡切换大集合

    代码地址如下:http://www.demodashi.com/demo/14028.html 一.前期准备工作 软件环境:微信开发者工具 官方下载地址:https://mp.weixin.qq.co ...

  10. jquery checkbox选框操作

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <hea ...