[squid-users] Works with images only, everything else: TCP_MISS/200

From: Jack Engqvist Johansson <jack_at_skysel.com>
Date: Sat, 26 Feb 2011 17:46:28 +0100

Hi, I got my reverse proxy to work now. But I got one problem:

It only caches images (png/jpg). If i look at the access.log I see TCP_MISS/200.
Whats wrong with my configuration?

Thanks in advance, Jack

access.log:
1298738665.393 1 93.182.143.156 TCP_MISS/304 242 GET
http://demo.nectos.org:8000/admin/management.js -
FIRST_UP_PARENT/nectrussquid -
1298738671.567 1 93.182.143.156 TCP_MISS/200 5630 GET
http://demo.nectos.org:8000/admin/management.js -
FIRST_UP_PARENT/nectrussquid application/x-javascript
1298738677.343 1 93.182.143.156 TCP_MISS/200 5630 GET
http://demo.nectos.org:8000/admin/management.js -
FIRST_UP_PARENT/nectrussquid application/x-javascript

squid.conf:

http_port 80 accel vport=8000 vhost act-as-origin
cache_peer localhost parent 8000 0 no-query originserver name=nectrussquid
acl oursites dstdomain .nectrus.com .tekulturen.se .cust.relakks.com
acl all2 src 0.0.0.0/0.0.0.0
cache_peer_access nectrussquid allow all2
http_access allow all
http_access allow all2
http_access allow oursites

acl cache_html rep_mime_type text/html text/css text/javascript
image/png image/jpeg application/xhtml+xml application/xml text/plain
application/x-javascript application/javascript
acl javascript rep_mime_type -i ^application/x-javascript$
no_cache deny cache_html
no_cache deny javascript
cache allow all
cache allow javascript
cache allow cache_html

http_reply_access allow cache_html
http_reply_access allow javascript
never_direct allow all

cache_mem 100 MB

# change below to match your hostname (used in logs as host)
visible_hostname nectrus.com

#cache_store_log none

refresh_pattern -i \.php$ 0 50% 420 ignore-no-cache
override-expire ignore-private override-lastmod
refresh_pattern -i \.jpg$ 10 90% 42000 ignore-no-cache
override-expire ignore-private override-lastmod
refresh_pattern -i \.gif$ 0 50% 420
refresh_pattern -i \.png$ 10 90% 42000 ignore-no-cache
override-expire ignore-private override-lastmod
refresh_pattern -i \.js$ 0 90% 4200 ignore-no-cache
override-expire ignore-private override-lastmod
refresh_pattern -i \.htm$ 0 20% 420
refresh_pattern -i \.html$ 0 20% 4200 ignore-no-cache
override-expire ignore-private override-lastmod
refresh_pattern -i \.css$ 50 100% 7200 ignore-no-cache
override-expire ignore-private override-lastmod
Received on Sat Feb 26 2011 - 16:46:56 MST

This archive was generated by hypermail 2.2.0 : Sun Feb 27 2011 - 12:00:03 MST