[squid-users] Re: Reverse proxy always misses cache items (dynamic pages)

From: juan_fla <juan.the.dreamer_at_gmail.com>
Date: Tue, 10 Dec 2013 19:16:50 -0800 (PST)

Thank you Amos. It's been a while before I could finally get back to this
issue.

I updated my squid.conf per your recommendations (set up cache_dir, changed
debug_options, also used strip_query_terms off to log full urls with
parameters)

debug_options 11 2

http_access allow manager localhost

http_port 3129 accel defaultsite=mydomain.org
cache_peer 127.0.0.1 parent 3130 0 no-query originserver name=myAccel
login=PASS forceddomain=mydomain.org

acl our_sites dstdomain mydomain.org
acl our_sites2 dstdomain localhost
http_access allow our_sites
http_access allow our_sites2

http_access allow localhost

refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320

cache_peer_access myAccel allow our_sites
cache_peer_access myAccel allow our_sites2

cache_dir ufs /u/home/mydomain/opt/squid/var/cache 100 16 256

I tried browsing pages (from a browser on a remote client) and also getting
the headers through telnet. This is from access.log

1386731129.654 28 127.0.0.1 TCP_MISS/304 342 GET
http://localhost:3129/index.php?title=Main_Page - FIRSTUP_PARENT/127.0.0.1 -
1386731130.074 44 127.0.0.1 TCP_REFRESH_UNMODIFIED/304 291 GET
http://localhost:3129/load.php?debug=false&lang=en&modules=mediawiki.legacy.commonPrint%2Cshared%7Cskins.monobook&only=styles&skin=monobook&*
- FIRSTUP_PARENT/127.0.0.1 -
1386731130.194 172 127.0.0.1 TCP_REFRESH_MODIFIED/200 11439 GET
http://localhost:3129/load.php?debug=false&lang=en&modules=startup&only=scripts&skin=monobook&*
- FIRSTUP_PARENT/127.0.0.1 text/javascript
1386731136.877 33 127.0.0.1 TCP_MISS/304 342 GET
http://localhost:3129/index.php?title=Hygiene - FIRSTUP_PARENT/127.0.0.1 -
1386731139.501 83 127.0.0.1 TCP_MISS/304 342 GET
http://localhost:3129/index.php?title=Main_Page - FIRSTUP_PARENT/127.0.0.1 -
1386731182.627 29 127.0.0.1 TCP_MISS/200 472 HEAD
http://localhost:3129/index.php - FIRSTUP_PARENT/127.0.0.1 text/html

Notice two calls to index.php?title=Main_Page , both missed. Also last call
is a HEAD request, and the headers basically show:

HTTP/1.1 200 OK
Date: Wed, 11 Dec 2013 02:54:15 GMT
Server: Apache
X-Powered-By: PHP/5.2.6
X-Content-Type-Options: nosniff
Vary: Accept-Encoding,Cookie
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: private, must-revalidate, max-age=0
Content-Language: en
Last-Modified: Thu, 21 Nov 2013 03:44:42 GMT
Content-Type: text/html; charset=UTF-8
X-Cache: MISS from tourmaline.tilted.net
Via: 1.1 tourmaline.tilted.net (squid/3.3.8)
Transfer-Encoding: chunked

At this point, access.log continues showing all missed files. I really don't
understand what I need to do in order to have squid cache using localhost,
or to try to hit using mydomain, and I don't seem to get any information
from the headers.

Thanks in advance for your help

--
View this message in context: http://squid-web-proxy-cache.1019090.n4.nabble.com/Reverse-proxy-always-misses-cache-items-dynamic-pages-tp4663562p4663767.html
Sent from the Squid - Users mailing list archive at Nabble.com.
Received on Wed Dec 11 2013 - 03:17:33 MST

This archive was generated by hypermail 2.2.0 : Wed Dec 11 2013 - 12:00:05 MST