+ Responder ao Tópico



  1. #1

    Padrão Squid Cache full

    Oi Pessoal,

    Estou tentando colocar para funcionar através do artigo - Squid 2.6 + HTB-tools com cache full “Viva o Linux.com.br - Página não encontrada e não estou conseguindo fazer com que as maquinas baixe o arquivo em alta velocidade, fora isso o Proxy funcionando normal junto com HTB, alguém poderia me indicar uma outra solução mais pratica, onde tenha o mesmo resultado do artigo?

    Servidor
    IBM Netfinit 3000 (700Mhz, 256Mb e 2 HD SCSI 8GB)

    Sistema:
    Slackware 12
    Iptables-1.3.8
    Squid-2.6.STABLE13
    HTB-tools-0.3.0a
    Kernel-2.6.21.5-smp

    Squid.conf

    http_port 10.10.1.11:3128 transparent
    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 128 MB
    maximum_object_size 4096 KB
    cache_swap_low 90
    cache_swap_high 95
    cache_access_log /var/log/squid/access.log
    cache_log /var/log/squid/cache.log
    cache_store_log /var/log/squid/store.log

    #cache do squid, fique atento pra deixar o cache neste local /var/cache/squid
    #cache_dir aufs /cache/squid 8000 16 256
    cache_dir aufs /cache/squid1 2000 16 256
    cache_dir aufs /cache/squid2 2000 16 256
    cache_dir aufs /cache/squid3 2000 16 256
    cache_dir aufs /cache/squid4 2000 16 256

    access_log none
    cache_store_log none
    refresh_pattern ^ftp: 1440 20% 10080
    refresh_pattern ^gopher: 1440 0% 1440
    refresh_pattern . 0 20% 4320
    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 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 Safe_ports port 901 # SWAT
    acl purge method PURGE
    acl CONNECT method CONNECT
    http_access allow manager localhost
    http_access deny manager
    http_access allow purge localhost
    http_access deny purge
    http_access deny !Safe_ports
    http_access deny CONNECT !SSL_ports

    #aqui estão as máquinas de nosso cenário
    acl máquina01 src 10.10.1.254
    acl máquina02 src 10.10.1.253
    #acl máquina03 src 192.168.254.3
    #acl máquina04 src 192.168.254.4
    http_access allow máquina01
    http_access allow máquina02
    #http_access allow máquina03
    #http_access allow máquina04

    http_access allow localhost
    http_access deny all
    http_reply_access allow all
    icp_access allow all
    #valor do tos necessário para o cache funcionar a toda velocidade.
    zph_tos_local 16
    zph_tos_parent off
    forwarded_for off
    error_directory /usr/share/squid/errors/Portuguese
    coredump_dir /cache/squid
    detect_broken_pconn on
    pipeline_prefetch on

    Agradeço ajuda de todos

  2. #2

    Padrão

    o link que você passou do tutorial deve estar errado.

    você instalou o patch ZPH?

  3. #3

    Padrão

    Citação Postado originalmente por lucianogf Ver Post
    o link que você passou do tutorial deve estar errado.

    você instalou o patch ZPH?
    Ja instalei o zph antes de compilar o squid!!!

  4. #4

    Padrão

    estão faltando algumas linhas do zph no squid.conf

  5. #5

    Padrão

    Citação Postado originalmente por lucianogf Ver Post
    estão faltando algumas linhas do zph no squid.conf
    Lucianogf,

    Vc pode me mostra um exemplo?

    Grato,

  6. #6

    Padrão

    o seu squid.conf deveria ter as linhas abaixo

    Código :
    #  TAG: zph_tos_local
    #  Allows you to select a TOS/Diffserv value to mark local hits. Read above
    #  (tcp_outgoing_tos) for details/requirements about TOS.
    #  Default: 0 (disabled).
    #
    #Default:
    # zph_tos_local 0
    zph_tos_local 0x10
     
    #  TAG: zph_tos_peer
    #  Allows you to select a TOS/Diffserv value to mark peer hits. Read above
    #  (tcp_outgoing_tos) for details/requirements about TOS.
    #  Default: 0 (disabled).
    #
    #Default:
    # zph_tos_peer 0
    zph_tos_peer 0x10
     
    #  TAG: zph_tos_parent  on|off
    #  Set this to off if you want only sibling hits to be marked.
    #  If set to on (default), parent hits are being marked too.
    #
    #Default:
    # zph_tos_parent on
    zph_tos_parent on
     
    #  TAG: zph_preserve_miss_tos on|off
    #  If set to on (default), any HTTP response towards clients will
    #  have the TOS value of the response comming from the remote
    #  server masked with the value of zph_preserve_miss_tos_mask.
    #  For this to work correctly, you will need to patch your linux
    #  kernel with the TOS preserving ZPH patch.
    #  Has no effect under FreeBSD, works only under linux ZPH patched
    #  kernels.
    #
    #Default:
    zph_preserve_miss_tos on
    #zph_preserve_miss_tos off
     
    #  TAG: zph_preserve_miss_tos_mask
    #  Allows you to mask certain bits in the TOS received from the
    #  remote server, before copying the value to the TOS send towards
    #  clients.
    #  See zph_preserve_miss_tos for details.
    #
    #  Default: 255 (TOS from server is not changed).
    #
    #Default:
    # zph_preserve_miss_tos_mask 255
    zph_preserve_miss_tos_mask 1