Merdouille wrote:
> Hi,
>
> I dont understand why my squid doesn't cache anything :
>
Here you neglect to say what version and release of squid you are using...
> my acces log said TCP_CLIENT_REFRESH_MISS:DIRECT
>
Here you show a line which indicates that yes, your squid cached
something, and on being retrieved the client forced squid to fetch a new
one anyways.
Ref: http://wiki.squid-cache.org/SquidFaq/SquidLogs
> my cfg :
>
> # On écoute le port 80 pour faire un proxy transparent
> http_port 80 transparent
>
> #=============== GESTIONS DES LOGS
> # emplacement
> access_log /var/log/squid/access.log
> cache_log /var/log/squid/cache.log
> cache_store_log /var/log/squid/store.log
> cache_swap_log /var/log/squid/swap.log
> useragent_log /var/log/squid/useragent.log
> referer_log /var/log/squid/referer.log
> # Options
> emulate_httpd_log on
> client_netmask 255.255.255.255
>
> #============== GESTION DU CACHE
> # Objet a cacher
> # ici il y a des expressions régulières puis la durée minimum, le % de temps
> accpetable
> # type min % max options
> refresh_pattern -i \*.jpg$ 1 50% 2 override-expire
> reload-into-ims ignore-reload
> # Cache Disque
> # mode lien taille R1 R2
> options
> cache_dir ufs /var/spool/squid/ 1000 16 256
> max-size=32768
Objects 32 KB maximum object size stored?
> maximum_object_size 32768 KB
Yet 32 MB can be attempted to be stored? This combo might lead to problems.
> minimum_object_size 0 KB
> # Cache RAM
> cache_mem 100 MB
> maximum_object_size_in_memory 4096 KB
> memory_replacement_policy lru
> cache_replacement_policy lru
>
> #============== REWRITE URL
> url_rewrite_program /etc/squid/rewriter.php
> url_rewrite_children 20
> redirector_bypass off
>
> #============== ACL's
> acl all src all
> acl rw url_regex -i http://192.168.100.189/img=*
> acl out dstdomain "/etc/squid/white"
> acl localhost src 127.0.0.1
> acl manager proto cache_object
>
> #============= Application des ACL
> url_rewrite_access allow rw
> http_access allow manager localhost
> http_access allow rw
> http_access deny all
> http_reply_access allow out
> deny_info TCP_RESET all
> #=============== MISC
> pid_filename /var/run/squid.pid
> cachemgr_passwd toto all
> # pas de protocole d'échnage de cache
> icp_port 0
> # pas de snmp
> snmp_port 0
>
> half_closed_clients off
> dns_nameservers 192.168.100.1 192.168.100.1
One nameserver, one entry.
Or better yet;
place the correct network nameserver in /etc/resolv.conf and drop
this setting entirely.
> #évite de garder des stat sur les IP
> client_db off
> buffered_logs on
> client_persistent_connections off
>
> if i use http_port 80 tranparent, url rewrite is OK but without cache
> If i use http_port 80, squid send me an error page like :
>
> While trying to process the request:
>
> GET
> /img=http%3A%2F%2Ffiles.macbidouille.com%2Fmbv2%2Fnews%2F200509%2Fnano_1yen.jpg
> HTTP/1.1
> Host: 192.168.100.189
> ....
> Invalid Request
>
Yes. Well. Intercepted requests and reverse-proxy requests are not the
same URL format as forward-proxy requests. Please specify the correct
input mode the requests are coming in as:
http://wiki.squid-cache.org/SquidFaq (section: "Modes")
Amos
-- Please be using Current Stable Squid 2.7.STABLE6 or 3.0.STABLE14 Current Beta Squid 3.1.0.7Received on Wed Apr 15 2009 - 12:56:59 MDT
This archive was generated by hypermail 2.2.0 : Wed Apr 15 2009 - 12:00:02 MDT