[squid-users] Squid + Apache Virtual Hosts behind NAT

From: Matt Rickard <mjr318@dont-contact.us>
Date: Wed, 7 Aug 2002 17:38:58 -0400

Here is my setup--I have an OpenBSD 3.1 router NATing an internal network
(192.168.1.X). In this network at 192.168.1.99 is a Slackware 8 system
running Squid 2.4Stable6 and Apache 1.3.26. Traffic is forwarded from the
router on port 80 to the Slackware server.

Now, from outside the network, everything is perfect. The right web site is
loaded perfectly depending on which virtual host is pointed to.

The problem comes from inside the network. Since I can't NAT out and then
back in again using these domain names, rather than setting up an internal
DNS server I've added these two domain names in the /etc/hosts file on the
client systems, pointing at the internal webserver. Now this works if I
don't go through the proxy(which runs on the same system as the webserver).
If I do go through the proxy, I can load the default host, but not the 2nd
virtual host. The /etc/hosts file on the proxy/apache server also has
entries pointing back at itself for those two domain names.

Any ideas on what I'm doing wrong here? It seems like Squid isn't reading
the /etc/hosts file properly.

Thanks.
Received on Wed Aug 07 2002 - 15:42:33 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:09:33 MST