CS174
Chris Pollett
Nov. 24, 2010
/usr/local/squid/sbin/squid -zThis just makes the cache directories (${squid}/var/cache/hex_number), if you don't already have them .
/usr/local/squid/sbin/squid -NCd1 #for debuggingwithout -NCd1 if don't want debugging.
acl localhost src 127.0.0.1/32
http_access allow localhost
${squid}/bin/squidclient http://pollett.org/ HTTP/1.0 200 OK Date: Wed, 24 Nov 2010 20:57:21 GMT Server: Apache/2.2.15 (Unix) mod_ssl/2.2.15 OpenSSL/0.9.8l DAV/2 PHP/5.3.3 SVN/1.6.5 X-Powered-By: PHP/5.3.3 Cache-Control: max-age=60 Expires: Wed, 24 Nov 2010 20:58:21 GMT MS-Author-Via: DAV Content-Length: 2231 Content-Type: text/html X-Cache: MISS from chris-polletts-macbook-pro.local Via: 1.0 chris-polletts-macbook-pro.local (squid/3.0.STABLE10) Proxy-Connection: close <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> ...
http_port (probably set to port 80 from default 3128) httpd_accel_host (set to virtual if have more than one web server; otherwise, to ip address of the web server) httpd_accel_port (port number of web servers 80) httpd_accel_single_host ( on or off depending on how many webservers you have,) httpd_accel_uses_host_header off
cache_peer ip.of.server1 parent 80 0 no-query round-robin acl sites_server_1 dstdomain www.mysite.com http_access allow sites_server_1 cache_peer ip.of.server2 parent 80 0 no-query round-robin acl sites_server_2 dstdomain www.mysite.com http_access allow sites_server_2