Search squid archive

Squid not caching images

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I am running Squid 3.1.19 on Ubuntu 12.04. I have a simple html page
with an image that is hosted on a Apache server on the same LAN. The
server runs on 192.168.122.11, Squid on 192.168.122.22 and the client
here is 192.168.122.33. The problem is, Squid caches the html page but
does not cache the image in it. Access.log shows this:
1342409528.532     0        192.168.122.33     TCP_MEM_HIT/200
577           GET   http://test-server/          - NONE/-
                       text/html
1342409533.541     4960   192.168.122.33     TCP_MISS/200
5966089    GET   http://test-server/rc.jpg   - FIRST_UP_PARENT/myAccel
   image/jpeg

My config is this:

http_port 80 accel defaultsite=test-server vhost
cache_peer 192.168.122.11 parent 80 0 no-query originserver name=myAccel
acl our_sites dstdomain test-server
http_access allow our_sites
cache_peer_access myAccel allow our_sites
cache_peer_access myAccel deny all
acl manager proto cache_object
acl localhost src 127.0.0.1/32 ::1
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1
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 allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access deny all
http_port 3128
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
refresh_pattern .        10000    20%    4320

This is the HTTP header when the web server connects to Squid, it does
have Cache-Control with max-age set to a high value.

HTTP/1.1 200 OK,
Date: Mon, 16 Jul 2012 04:21:09 GMT,
Server: Apache/2.2.22 (Ubuntu),
Last-Modified: Fri, 13 Jul 2012 17:59:08 GMT,
ETag: "49f46-5b0795-4c4b9d6354b1f",
Accept-Ranges: bytes,
Content-Length: 5965717,
Cache-Control: max-age=864000, public
Keep-Alive: timeout=5, max=100,
Connection: Keep-Alive, Content-Type: image/jpeg,

How can I fix this? Am I missing something here?

Thanks


[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux