zoukankan      html  css  js  c++  java
  • 分享一个不错的squid 配置文件

    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

  • 相关阅读:
    牛影传说【线段树+BFS序运用】
    动态规划 :传纸条
    CQYZ-OJ P1377 危险的组合
    使用 git 管理你的配置文件
    Exponential Distribution
    初尝 C++ 类设计
    Android刷机的一般步骤
    重装 Linux 记录
    Linux 折腾记录 (非正式)
    最大熵对应的概率分布
  • 原文地址:https://www.cnblogs.com/cfinder010/p/3353440.html
Copyright © 2011-2022 走看看