服務(wù)項(xiàng)目:網(wǎng)站建設(shè)、仿站、程序開發(fā)、APP開發(fā)設(shè)計(jì)、移動(dòng)網(wǎng)站開發(fā)設(shè)計(jì)、企業(yè)網(wǎng)站設(shè)計(jì)、電子商務(wù)網(wǎng)站開發(fā)、網(wǎng)站維護(hù)、網(wǎng)站推廣、UX/UI 、HTML5、CSS3、JS / Jquery ...
          四川浚浚科技有限公司
          四川浚浚科技有限公司 (開發(fā)設(shè)計(jì)官網(wǎng))TEL : 15308000360 / QQ : 38585404
          深入挖掘用戶需求
          成就品質(zhì)用戶體驗(yàn)

          您的位置:首頁 > 技術(shù)經(jīng)驗(yàn) > 服務(wù)器 > 正文

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

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

          #
          # User Squid
          #
          
          #
          # Recommended minimum configuration:
          #
          
          http_port 80 accel vhost vport
          
          #------------------------------------------------------------------------------
          #第一臺(tái)服務(wù)器
          cache_peer 118.100.100.133 parent 80 0 no-query originserver weight=1 name=xxcdn
          cache_peer_domain xxcdn .xxcdn.com
          #------------------------------------------------------------------------------
          #第二臺(tái)服務(wù)器
          cache_peer 118.100.100.138 parent 80 0 no-query originserver weight=1 name=jwcdn
          cache_peer_domain jwcdn .junww.com
          
          #------------------------------------------------------------------------------
          #讓所有未綁定前面服務(wù)器的域名全部指向下面這臺(tái)服務(wù)器:
          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中設(shè)置默認(rèn)首頁的方法
          下一篇:首次用服務(wù)器的站長常犯的錯(cuò)誤

          相關(guān)熱詞搜索:squid
          主站蜘蛛池模板: a级毛片毛片免费观看久潮喷| 亚洲国产高清美女在线观看| 99视频精品国在线视频艾草| 天天综合在线观看| 久久免费视频网站| 欧美色欧美亚洲高清在线观看| 四虎国产成人永久精品免费| 精品第一国产综合精品蜜芽| 天天爱天天操天天干| 久久久久亚洲AV综合波多野结衣| 欧美性69式xxxx护士| 免费a级毛视频| 色橹橹欧美在线观看视频高清| 国产精品久久福利网站| writeas朱志鑫| 无码精品国产一区二区三区免费| 亚洲乱亚洲乱少妇无码| 特级毛片A级毛片免费播放| 四虎www成人影院| 麻豆果冻传媒精品二三区| 国产综合成人久久大片91| 一a一片一级一片啪啪| 日本不卡高字幕在线2019| 亚洲va久久久噜噜噜久久| 泳衣男漫画臀篇佳门サエコcc| 另类小说图片综合网| 香蕉视频在线播放| 欧美一级在线播放| 内射白嫩少妇超碰| 贵妇肉体销魂阅读| 国产白嫩美女在线观看| 99久久国产综合精品五月天| 强行扒开双腿猛烈进入 | 国产午夜一区二区在线观看| 538国产视频| 好爽好紧好大的免费视频国产| 丰满多毛的大隂户毛茸茸| 日韩精品卡二卡3卡四卡| 亚洲国产成人精品无码区在线观看 | 黄色免费网站在线看| 国产精品毛片a∨一区二区三区 |