Squid3 não esta fazendo Cache

1. Squid3 não esta fazendo Cache

Davi lima
verdinho

(usa Debian)

Enviado em 30/07/2015 - 16:31h

Ola pessoal estou configurando um servidor para cache usando Ubunto 14.2 sendo que o servidor esta rodando sem erros mais o squid não esta fazendo cache, quando eu dou o comando para ver os logs tail -f /var/log/squid3/access.log o resultado e este este Maldito TCP_MISS/200
ou seja ele ta ate funcionando sei que quando esta funcionando ao inves de aparecer TCP_HIT aparece TCP_MISS/200 alguem poderia me ajudar com este Problema? vou postar meu squid.conf e parte do meu access.log nao sei realmente o que ta faltando!!!


#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 network src 192.168.88.0/21

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 deny to_localhost
#http_access allow localnet
http_access allow localhost
http_access allow network
http_access deny all

http_port 3128

cache_mem 256 MB
maximum_object_size_in_memory 512 KB
cache_dir ufs /var/spool/squid3 100 16 256

refresh_pattern -i .flv$ 10080 90% 999999 ignore-no-cache override-expire ignore-private
acl youtube dstdomain .youtube.com
cache allow youtube

minimum_object_size 1 KB
maximum_object_size 4 MB

cache_swap_low 90
cache_swap_high 95

access_log daemon:/var/log/squid3/access.log squid
cache_log /var/log/squid3/cache.log
coredump_dir /var/spool/squid3

refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern (Release|Packages(.gz)*)$ 0 20% 2880
# example lin deb packages
#refresh_pattern (\.deb|\.udeb)$ 129600 100% 129600
refresh_pattern . 0 20% 4320


cache_mgr xnetbrasil@hotmail.com

cache_effective_user proxy
visible_hostname NetProProxy


############Minha Access.log############

1438284634.452 499 192.168.89.41 TCP_MISS/304 353 GET http://tm.uol.com.br/mercurio.html - HIER_DIRECT/200.221.2.83 -
1438284634.512 511 192.168.89.41 TCP_MISS/200 6743 GET http://sna-slb.dynad.net/eval/1000021? - HIER_DIRECT/200.147.166.106 -
1438284634.749 794 192.168.89.41 TCP_MISS/304 354 GET http://jsuol.com.br/p/dmp/tt/profiles.js - HIER_DIRECT/200.221.2.85 -
1438284635.070 1113 192.168.89.41 TCP_MISS/304 499 GET http://tags.t.tailtarget.com/t3m.js? - HIER_DIRECT/173.193.67.10 -
1438284635.101 350 192.168.89.41 TCP_MISS/200 4390 GET http://t5.dynad.net/script/? - HIER_DIRECT/200.147.166.105 text/javascript
1438284635.349 389 192.168.89.41 TCP_MISS/200 818 GET http://tt-10162-1.seg.t.tailtarget.com/profile - HIER_DIRECT/52.5.216.143 application/x-javascript
1438284635.576 621 192.168.89.41 TCP_MISS/200 1289 GET http://tm.jsuol.com.br/modules/mercurio.js - HIER_DIRECT/200.147.73.192 application/javascript
1438284636.155 972 192.168.89.41 TCP_MISS/200 32727 GET http://s.dynad.net/stack/bUQECGhJrXYBTX3EI9Mk2LwVWQF2xMiD1VpTMyywTVI.html - HIER_DIRECT/200.147.166.107 text/html
1438284636.746 509 192.168.89.41 TCP_MISS/304 340 GET http://static.chartbeat.com/js/chartbeat.js - HIER_DIRECT/23.48.162.127 application/x-javascript
1438284637.403 537 192.168.89.41 TCP_MISS/200 362 GET http://ping.chartbeat.net/ping? - HIER_DIRECT/50.16.186.65 image/gif
1438284637.447 799 192.168.89.41 TCP_MISS/200 1049 POST http://dna.uol.com.br/service/sample - HIER_DIRECT/186.234.132.14 application/json
1438284637.460 1120 192.168.89.41 TCP_MISS/200 655 GET http://tracker.bt.uol.com.br/partner? - HIER_DIRECT/200.147.15.205 application/javascript
1438284637.575 1330 192.168.89.41 TCP_MISS/304 500 GET http://d.tailtarget.com/conversion.js - HIER_DIRECT/173.193.67.10 -
1438284638.211 579 192.168.89.41 TCP_MISS/200 726 GET http://tt-10162-1.seg.t.tailtarget.com/trk? - HIER_DIRECT/52.5.216.143 image/png
1438284638.260 596 192.168.89.41 TCP_MISS/200 632 GET http://b.t.tailtarget.com/b? - HIER_DIRECT/54.152.129.244 application/x-javascript
1438284638.554 2147 192.168.89.41 TCP_MISS/200 32680 GET http://imguol.com.br/c/home/layout/camaleao/web/gerais/favicon.ico - HIER_DIRECT/200.147.68.18 image/x-icon
1438284638.765 441 192.168.89.41 TCP_MISS/200 631 GET http://tt-10162-1.seg.t.tailtarget.com/ca? - HIER_DIRECT/52.5.216.143 application/javascript
1438284638.954 393 192.168.89.41 TCP_MISS/304 629 GET http://imguol.com.br/c/home/layout/camaleao/web/gerais/favicon.ico - HIER_DIRECT/200.147.68.18 image/x-icon
1438284639.399 556 192.168.89.41 TCP_MISS/200 630 GET http://t.tailtarget.com/__tt.gif? - HIER_DIRECT/54.165.214.126 image/gif


alguém poderia me ajudar???



  


2. Re: Squid3 não esta fazendo Cache

jose marciano de sousa brito
jmsb

(usa Outra)

Enviado em 31/07/2015 - 18:28h

no meu eu configure assim

refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern (Release|Packages(.gz)*)$ 0 20% 2880
# example lin deb packages
#refresh_pattern (\.deb|\.udeb)$ 129600 100% 129600
refresh_pattern . 45 20% 4320 ### aqui significa o tempo valido do cache , que no caso e de 45 minutos

cache allow all ## Permite o acesso ao cache.

tome cuidado com as sites dinâmicos hoje e comum sites dinâmicos , site que se atualiza a todo tempo , no meu caso eu crio acl para não fazer cache de algumas paginas ,


3. Iptables

chtarles
chtarles

(usa Slackware)

Enviado em 02/08/2015 - 13:12h

Já verificou suas regra de redirecionamento no iptables?







Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts