[squid-users] cache-peer and hosts file

From: NublaII Lists <nublaii.lists_at_gmail.com>
Date: Wed, 18 Nov 2009 12:20:57 +0100

Hi there

I have a couple of quick questions to which I have seen many examples,
but I have never been able to figure out the whole picture.

In a simple setup like this:

1 squid machine
2 www servers

website: www.example.com
external ip: 1.2.3.4

squid machine:
name: squid.example.com
ip: 10.0.0.1

www1 machine:
name: www1.example.com
ip: 10.0.0.2

www2 machine:
name: www2.example.com
ip: 10.0.0.3

Here is the part of the squid.conf that applies here

# Basic parameters
visible_hostname www.example.com
# This line indicates the server we will be proxying for
http_port 80 accel defaultsite=www.example.com
# And the IP Address for it
cache_peer 10.0.0.2 parent 80 0 no-query originserver round-robin
cache_peer 10.0.0.3 parent 80 0 no-query originserver round-robin

So, questions...

- is the squid.conf syntax correct?
- what should I have on the /etc/hosts file on the squid machine?
RIght now this is what I have

127.0.0.1 localhost
10.0.0.1 squid.example.com
10.0.0.2 www.example.com
10.0.0.3 www.example.com
Received on Wed Nov 18 2009 - 11:21:06 MST

This archive was generated by hypermail 2.2.0 : Thu Nov 19 2009 - 12:00:03 MST