Squid traffic accelerator is not caching my .html files

From: Fyodor <fyodor@dont-contact.us>
Date: Mon, 8 Nov 1999 04:39:42 -0500 (EST)

Hello everyone,

I am trying to set Squid up as a traffic accelerator to mirror my main
server (which is on a very slow link). Everything works fine *except*
that the text/html pages on my site are not ever being cached :(.
Images, and .txt files are cached OK.

The troublesome HTML pages use SSI, but the content doesn't change and I
am using Apache's X-Bit Full Hack to send a 'Last-Modified' field with the
date that the underlying file was last changed.

So far I have tried Squid 2.2STABLE5 and 2.2.DEVEL3. I have tried the
default squid.conf (except for the http_accel_host and http_accel_port
) as well as conf files with many modifications. I have even tried
adding this ugly directive:

refresh_pattern . 20 20% 4320 override-expire override-lastmod ignore-reload

My impression was that the above command would tell Squid to *always*
cache everything for at least 20 minutes. Unfortunately Squid still
refuses to cache my text/html files.

When requests are made, these are added to access.log:

942050881.954 15720 129.227.129.115 TCP_MISS/200 43693 GET http://63.192.132.102/nmap/ - DIRECT/63.192.132.102 text/html
942051293.673 143 Moscow16-A2.rosprint.net TCP_MISS/304 164 GET http://63.192.132.102/nmap/ - DIRECT/63.192.132.102 -
942051378.174 990 moriarty.pdb.sni.de TCP_MISS/200 225 HEAD http://63.192.132.102/nmap/ - DIRECT/63.192.132.102 text/html
942051785.504 8498 137.132.2.109 TCP_MISS/200 43693 GET http://63.192.132.102/nmap/ - DIRECT/63.192.132.102 text/html

And the following appears in store.log:

942050881.954 RELEASE FFFFFFFF 200 942051974 941283929 -1 text/html -1/43468 GET http://63.192.132.102/nmap/
942051293.673 RELEASE FFFFFFFF 304 942052401 -1 -1 unknown -1/0 GET http://63.192.132.102/nmap/
942051378.174 RELEASE FFFFFFFF 200 942052485 941283929 -1 text/html -1/0 HEAD http://63.192.132.102/nmap/
942051785.504 RELEASE FFFFFFFF 200 942052885 941283929 -1 text/html -1/43468 GET http://63.192.132.102/nmap/

Here are the sniffed headers of Squid requesting the same file twice
in a row from the origin server rather than caching it:

[ Request 1 from Squid -> Origin server ]
GET /nmap/ HTTP/1.0
Accept: */*
Referer: http://128.196.109.24/
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 4.01; Windows 98)
Host: 128.196.109.24
Via: 1.1 payfonez.insecure.org:80 (Squid/2.3.DEVEL3)
X-Forwarded-For: 209.5.143.9
Cache-Control: max-age=259200
Connection: keep-alive

[ Response from Origin Server --> Squid ]
HTTP/1.1 200 OK
Date: Mon, 08 Nov 1999 08:44:17 GMT
Server: Apache/1.3.9 (Unix)
Last-Modified: Sat, 30 Oct 1999 11:45:29 GMT
Connection: close
Content-Type: text/html

[ Full page here ... ]

[ Request #2 for the same file 2 minutes later. Squid --> Origin ]
GET /nmap/ HTTP/1.0
Host: www.insecure.org
Accept: text/html, text/plain, text/sgml, */*;q=0.01
Accept-Encoding: gzip, compress
Accept-Language: en
User-Agent: Lynx/2.8.2rel.1 libwww-FM/2.14
Via: 1.0 payfonez.insecure.org:80 (Squid/2.3.DEVEL3)
X-Forwarded-For: 195.96.230.213
Cache-Control: max-age=259200

[ And server response to this ]
HTTP/1.1 200 OK
Date: Mon, 08 Nov 1999 08:46:59 GMT
Server: Apache/1.3.9 (Unix)
Last-Modified: Sat, 30 Oct 1999 11:45:29 GMT
Connection: close
Content-Type: text/html

[ The file is here again ]

Does anyone have any ideas as to why Squid won't cache this? I
haven't been able to find an answer in the User Manual, the FAQ, or
the list archives. Any assistance is appreciated.

Thanks!
Fyodor
Received on Mon Nov 08 1999 - 02:54:55 MST

This archive was generated by hypermail pre-2.1.9 : Wed Apr 09 2008 - 11:57:32 MDT