[squid-users] pages not being cached

Amos Jeffries squid3 at treenet.co.nz
Fri Mar 11 02:52:10 UTC 2016


On 11/03/2016 6:30 a.m., Cindy Cicalese wrote:
> Thank you for your response, Eliezer.
> 
> I added the logformat command that you suggested. I needed to modify it
> slightly, since I'm running squid 3.1 (I changed <a to <A and removed
> %>eui). An example of what I am seeing in /var/log/squid/access.log is:

The 'eui' change is okay, but to ensure the traffic is flowing through
the correct routes we do need to compare the IPs so 'a' is needed, not 'A'.

> 
> 1457630282.410    490 172.31.169.175 TCP_MISS/200 4621 GET
> https://<server>/tw4/index.php/Two
> - FIRST_UP_PARENT/127.0.0.1 text/html Q-CC: "max-age=0" "max-age=0" Q-P:
> "-" "-" REP-CC: "s-maxage=18000, must-revalidate, max-age=0" REP-EXP: "-"
> VARY: "-"
> 

The client here is requiring that the cache not be used to answer this
request.

> 
> I am testing from a desktop browser (Chrome and IE). I am entering the page
> address directly rather than doing a browser refresh. I am watching
> /var/log/squid/access.log and /var/log/httpd/access.log to see what
> requests squid and apache are receiving.

Click in the address bar and press enter. Do that twice and see if the
access.log changes.
 The first may or may not be a MISS. The second should be a HIT or REFRESH.


>> On 10/03/2016 16:22, Cindy Cicalese wrote:
>> *>*   * Apache is also listening on <external ip>:80 which is set up as a
>> *>*     permanent redirect to HTTPS

If you move that redirect to Squid, you can remove the Apache IPs from
public view:

 http_port 80 accel defaultsite=<server name>
 acl HTTP proto HTTP
 deny_info 308:https://%H%R HTTP
 http_access deny HTTP


Amos



More information about the squid-users mailing list