Hi Amos,

That explains, thanks a lot.

Thanks

On Fri, Jul 6, 2012 at 12:22 AM, Amos Jeffries <squ...@treenet.co.nz> wrote:
> On 6/07/2012 6:10 a.m., Abhishek Chanda wrote:
>>
>> Hi all,
>>
>> Thanks for the responses.
>> I am using squid 3.1 on Ubuntu 12.04. For now I am just trying to
>> cache Apache's default "it works" page, which should be cache able. I
>> cannot use rebot here since my network is not connected to the
>> Internet.
>>
>> I tried to do the configuration from scratch again using the guideline at
>> http://wiki.squid-cache.org/ConfigExamples/Reverse/BasicAccelerator
>> and here is the new config:
>>
>> http_port 80 accel defaultsite=cona-server vhost
>> cache_peer 192.168.122.21 parent 80 0 no-query originserver name=myAccel
>> acl our_sites dstdomain cona-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.1/8 0.0.0.0/32 ::1
>> acl SSL_ports port 443
>> acl Safe_ports port 80
>> acl Safe_ports port 21
>> acl Safe_ports port 443
>> acl Safe_ports port 70
>> acl Safe_ports port 210
>> acl Safe_ports port 1025-65535
>> acl Safe_ports port 280
>> acl Safe_ports port 488
>> acl Safe_ports port 591
>> acl Safe_ports port 777
>> acl CONNECT method CONNECT
>> http_access allow all
>> 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 .   0   20% 4320
>>
>> Now, I noticed a strange behavior. With this config, squid was saying
>> TCP_REFRESH_UNMODIFIED, then when I restarted squid, it said TCP_MISS.
>> Then I cleared the browser cache and then Squid said
>> TCP_REFRESH_UNMODIFIED again. Is this expected?
>
>
> If you are testing by pressing the force-refresh button on the browser it
> sends controls to Squid requiring the server be re-contacted with an refresh
> check. The server appears to be sending back data identical to the last lot
> and Squid detects the lack of change, logs REFRESH_UNMODIFIED. The expected
> result is a 304 arriving at the browser from Squid.
>
> Amos
>

Reply via email to