服務項目:網站建設、仿站、程序開發、APP開發設計、移動網站開發設計、企業網站設計、電子商務網站開發、網站維護、網站推廣、UX/UI 、HTML5、CSS3、JS / Jquery ...
          四川???萍加邢薰?></a></div>
                    <div   id=四川???萍加邢薰? title=
          四川浚??萍加邢薰?(開發設計官網)TEL : 15308000360 / QQ : 38585404

          您的位置:首頁 > 技術經驗 > 服務器 > 正文

          分享浚網科技使用多年的squid配置文檔
          技術支持服務電話:15308000360 【7x24提供運維服務,解決各類系統/軟硬件疑難技術問題】

          用了這么多年squid走過無數的彎路,現在將我們優化的squid配置文件分享給大家,雖然談不上很強大,能負載多少多少,但是基本上運行很穩定,希望能夠幫到一些正在使用squid的兄弟姐妹們...

          #
          # User Squid
          #
          
          #
          # Recommended minimum configuration:
          #
          
          http_port 80 accel vhost vport
          
          #------------------------------------------------------------------------------
          #第一臺服務器
          cache_peer 118.100.100.133 parent 80 0 no-query originserver weight=1 name=xxcdn
          cache_peer_domain xxcdn .xxcdn.com
          #------------------------------------------------------------------------------
          #第二臺服務器
          cache_peer 118.100.100.138 parent 80 0 no-query originserver weight=1 name=jwcdn
          cache_peer_domain jwcdn .junww.com
          
          #------------------------------------------------------------------------------
          #讓所有未綁定前面服務器的域名全部指向下面這臺服務器:
          cache_peer 100.100.100.130 parent 20080 0 no-query originserver weight=1 name=cdnzz
          cache_peer_domain cdnzz .com .cn .net .org .cc .us .hk .la .pw
          
          #------------------------------------------------------------------------------
          
          coredump_dir /usr/local/squid/var/cache/squid
          cache_log /usr/local/squid/var/logs/cache.log
          access_log /usr/local/squid/var/logs/access.log squid
          cache_dir ufs /usr/local/squid/var/caches/ 50000 16 256
          
          #------------------------------------------------------------------------------
          
          visible_hostname znncnn.com
          cache_mgr web@junww.com
          cache_mem 512 MB
          cache_swap_low 90
          cache_swap_high 95
          maximum_object_size 51200 KB
          maximum_object_size_in_memory 512 KB
          minimum_object_size 0 KB
          ipcache_size 16380
          ipcache_low 80
          ipcache_high 90
          logfile_rotate  30
          httpd_suppress_version_string off
          
          forward_timeout 20 seconds
          connect_timeout 15 seconds
          acl OverConnLimit maxconn 128
          
          hierarchy_stoplist cgi-bin ?
          hierarchy_stoplist -i ^https:\\ ?
          acl QUERY urlpath_regex -i cgi-bin \? \.asp .\php \.aspx \.php \.jsp \.cgi
          acl DIRECT url_regex -i ^http:////www/.xxx/.com//.php$
          acl DIRECT url_regex -i ^http:////www/.xxx/.com//.htm$
          acl DIRECT url_regex -i ^http:////www/.xxx/.org//.html$
          acl denyssl urlpath_regex -i ^https:\\
          no_cache deny QUERY
          no_cache deny denyssl
          cache deny DIRECT
          max_open_disk_fds 0
          relaxed_header_parser on
          half_closed_clients off
          buffered_logs on
          
          vary_ignore_expire on
          
          #------------------------------------------------------------------------------
          reply_header_access Via deny all
          reply_header_access Cache-Control deny all
          reply_header_access Server deny all
          reply_header_access X-Squid-Error deny all
          reply_header_access X-Forwarded-For deny all
          request_header_access Via deny all
          request_header_access Age deny all
          request_header_access X-Squid-Error deny all
          request_header_access Pragma deny all
          #request_header_access X-Forwarded-For deny all
          #------------------------------------------------------------------------------
          acl babaicode dstdomain www.xxx.com
          no_cache deny babaicode
          
          acl bbcom dstdomain .xxx.com
          cache deny bbcom
          #------------------------------------------------------------------------------
          
          acl localnet src 10.0.0.0/8     # RFC1918 possible internal network
          acl localnet src 172.16.0.0/12  # RFC1918 possible internal network
          acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
          acl localnet src fc00::/7       # RFC 4193 local private network range
          acl localnet src fe80::/10      # RFC 4291 link-local (directly plugged) machines
          
          acl SSL_ports port 443
          acl Safe_ports port 80          # http
          acl Safe_ports port 21          # ftp
          acl Safe_ports port 443         # https
          acl Safe_ports port 70          # gopher
          acl Safe_ports port 210         # wais
          acl Safe_ports port 1025-65535  # unregistered ports
          acl Safe_ports port 280         # http-mgmt
          acl Safe_ports port 488         # gss-http
          acl Safe_ports port 591         # filemaker
          acl Safe_ports port 777         # multiling http
          acl CONNECT method CONNECT
          
          http_access deny !Safe_ports
          http_access deny CONNECT !SSL_ports
          http_access allow localhost manager
          http_access deny manager
          http_access allow localnet
          http_access allow localhost
          http_access allow all
          http_access deny all
          
          #------------------------------------------------------------------------------------
          
          refresh_pattern ^proxy:           60        20%        10080
          refresh_pattern ^gopher:        60        0%        1440
          refresh_pattern -i (/cgi-bin/|\?) 0     0%      0
          refresh_pattern -i \.htm$ 10 50% 60 reload-into-ims
          refresh_pattern -i \.html$ 10 50% 60 reload-into-ims
          refresh_pattern -i \.shtml$ 10 50% 60 reload-into-ims
          refresh_pattern -i \.js$ 10 50% 60 reload-into-ims
          refresh_pattern -i \.css$ 10 50% 60 reload-into-ims
          refresh_pattern -i \.jpg$ 1440 50% 2880 reload-into-ims
          refresh_pattern -i \.png$ 1440 50% 2880 reload-into-ims
          refresh_pattern -i \.gif$ 1440 50% 2880 reload-into-ims
          refresh_pattern -i \.bmp$ 1440 50% 2880 reload-into-ims
          refresh_pattern -i \.mp3$ 1440 50% 2880 reload-into-ims
          refresh_pattern -i \.mp4$ 1440 50% 2880 reload-into-ims
          refresh_pattern -i \.wmv$ 1440 50% 2880 reload-into-ims
          refresh_pattern -i \.rm$ 1440 50% 2880 reload-into-ims
          refresh_pattern -i \.swf$ 1440 20% 2880 reload-into-ims
          refresh_pattern -i \.mpeg$ 1440 50% 2880 reload-into-ims
          refresh_pattern -i \.wma$ 1440 50% 2880 reload-into-ims
          refresh_pattern -i \.rar$ 1440 50% 2880 reload-into-ims
          refresh_pattern -i \.zip$ 1440 50% 2880 reload-into-ims
          refresh_pattern -i \.7z$ 1440 50% 2880 reload-into-ims
          refresh_pattern -i \.pdf$ 1440 50% 2880 reload-into-ims
          refresh_pattern -i \.exe$ 1440 50% 2880 reload-into-ims
          refresh_pattern -i \.doc$ 1440 50% 2880 reload-into-ims
          refresh_pattern -i \.txt$ 1440 50% 2880 reload-into-ims
          refresh_pattern .               0       20%     4320
          



          上一篇:Apache中設置默認首頁的方法
          下一篇:首次用服務器的站長常犯的錯誤

          相關熱詞搜索:squid
          主站蜘蛛池模板: 欧美视屏在线观看| 黄网站色视频免费观看45分钟| 成人3d黄动漫无尽视频网站| 久久精品成人无码观看56| 欧美爽爽爽爽爽爽视频| 催眠医生动漫在线观看| 红楼遗梦成人h文完整版| 国产传媒在线观看视频免费观看| 婷婷综合五月天| 国产精品特黄毛片| 99久久国产综合精品成人影院| 成人h在线播放| 中文精品无码中文字幕无码专区| 日韩a视频在线观看| 亚欧色一区w666天堂| 欧美三级欧美一级| 亚洲日韩在线中文字幕综合| 特级毛片aaaaaa蜜桃| 免费国产va在线观看视频| 精品国产日韩亚洲一区| 回复术士的重来人生第一季樱花动漫| 韩国精品福利vip5号房| 国产成人不卡亚洲精品91| 色综合67194| 国产精品久久久久9999| 2021最新国产成人精品视频| 国产麻豆91在线| 999久久久国产精品| 天天干天天操天天操| tom影院亚洲国产一区二区| 年轻帅主玩奴30min视频| 中文在线观看免费网站| 推拿电影完整未删减版资源 | 豪妇荡乳1一5白玉兰| 国产在线国偷精品免费看| 黑人巨大精品大战白人美女| 国产日韩欧美亚欧在线| 欧美成视频无需播放器| 国产欧美va欧美va香蕉在线| 黄色福利小视频| 国产成人精品免费视频软件|