Skip to content.

UPR HPCf

Sections
Personal tools
You are here: Home » Members » humberto's Home » Test ZWiki » SquidCache
Views

SquidCache

last edited 6 years ago by humberto

Current Web Cache setup.

Web caching is done for the HPCf machines by cache.hpcf.upr.edu, currently pointing at astraeus. We use the squid cache software:

http://www.squid-cache.org/

Here's the patch to configure /etc/squid/squid.conf on redhat 6.1 (squid-2.2.STABLE4-8)

--- squid.conf.default  Sat Sep 11 20:00:03 1999
+++ squid.conf  Wed Jan 26 04:08:35 2000
@@ -996,6 +996,8 @@
 acl SSL_ports port 443 563
 acl Safe_ports port 80 21 443 563 70 210 1025-65535
 acl CONNECT method CONNECT
+#HPCf members
+acl HPCf src 136.145.54.0/255.255.255.0

# TAG: http_access # Allowing or Denying access based on defined access lists @@ -1027,6 +1029,7 @@ # INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS # http_access allow localhost +http_access allow HPCf http_access deny all

# TAG: icp_access @@ -1116,7 +1119,7 @@ # get errors about IP-forwarding you must set them to have individual # names with this setting. # -#visible_hostname www-cache.foo.org +visible_hostname cache.hpcf.upr.edu

# TAG: unique_hostname # If you want to have multiple machines with the same

To run squid at startup, do =/sbin/chkconfig --level 345 squid on=

To use squid as your cache, setup netscape or explorer to use the automatic proxy configuration file at:

http://www.hpcf.upr.edu/cache.pac

In netscape, select edit, preferences, expand advanced, and select proxys, then select "automatic proxy configuration", and type in the above url.

The cache.pac file reads:

//We (www.is.co.za) run a central cache for our customers that they
//access through a firewall - thus if they want to connect to their intranet
//system (or anything in their domain at all) they have to connect
//directly - hence all the "fiddling" to see if they are trying to connect
//to their local domain.

//Replace each occurrence of company.com with your domain name //and if you have some kind of intranet system, make sure //that you put it's name in place of "internal" below.

//We also assume that your cache is called "cache.company.com", and //that it runs on port 8080. Change it down at the bottom.

function FindProxyForURL(url, host) { //So the error message "no such host" will appear through the //normal Netscape box - less support queries :) if (!isResolvable(host)) return "DIRECT";

//We only cache http, ftp and gopher if (url.substring(0, 5) == "http:" || url.substring(0, 4) == "ftp:"|| url.substring(0, 7) == "gopher:")

//Change the ":8080" to the port that your cache //runs on, and "cache.company.com" to the machine that //you run the cache on return "PROXY cache.hpcf.upr.edu:3128; DIRECT"; else return "DIRECT"; }

-- Main.HumbertoOrtiz - 27 Nov 2000

 

Powered by Plone

This site conforms to the following standards: