Squid를 캐싱 서버로 구성하려고합니다. 웹 서버 (apache)가 192.168.122.11
오징어에 192.168.122.21
있고 클라이언트가에 있는 LAN 이 있습니다 192.168.122.22
. 문제는 Squid의 액세스 로그를 볼 때 TCP_MISS
메시지 만 표시 한다는 것입니다. 오징어가 전혀 캐싱하지 않는 것 같습니다. 캐시 디렉토리에 모든 적절한 권한이 있는지 확인했습니다. 여기서 또 무엇이 잘못 될 수 있습니까? 내 오징어 설정은 다음과 같습니다.
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 accel defaultsite=cona-proxy vhost
cache_peer 192.168.122.11 parent 80 0 no-query originserver login=PAS name=webserver
cache_dir ufs /var/spool/squid3 100 16 256
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
always_direct allow all
acl server_users dstdomain cona-proxy
http_access allow server_users
cache_peer_access webserver allow server_users
cache_peer_access webserver deny all
모든 시스템에서 cona-proxy
포인트는 192.168.122.21
(의 것을 추가 /etc/hosts
)
출력 curl -v 192.168.122.11
* About to connect() to 192.168.122.11 (#0)
* Trying 192.168.122.11... connected
> GET / HTTP/1.1
> User-Agent: curl/7.22.0 (i686-pc-linux-gnu) libculr/7.22.0 OpneSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: 192.168.122.11
> Accept: */*
>
< HTTP/1.1 202 OK
< Date Mon, 02 Jul 2012 05:48:50 GMT
< Server: Apache/2.2.22 (Ubuntu)
< Last-Modified: Tue, 19 Jun 2012 23:04:25 GMT
< ETag: "27389-b1-4c2db4dc2c182"
< Accept_Ranges: bytes
< Content-Length: 177
< Vary: Accept-Encoding
< Content-Type: text/html
< X-Pad: avoid browser bug
<
<html><body><h1>It works!</h1>
<p>This is the default web page for the server.</p>
<p>The web server software is running but no content has been added, yet. </p>
</body></html>
* Connection #0 to host 192.168.122.11 left intact
* Closing connection #0