Re: Can't get Squid to use /etc/hosts to resolve hostnames

From: Eelco M Glasl <[email protected]>
Date: Thu, 23 Mar 2000 09:46:10 +0100 (MET)

On Wed, 22 Mar 2000, Danny Cecil wrote:

> I'm using Squid 2.3 Stable 1 on a Red Hat Linux 6.1 system as an httpd
> accelerator for our web site. We are running into a problem when the web
> server tries to return a redirected URL. It returns the server name passed
> by Squid (httpd_accel_host) instead of the virtual server name (that maps to
> our LocalDirector). Since our firewall does not allow direct access to the
> web servers, these redirected links fail. In searching the Squid mailing
> list archives, I discovered that other people have run into the same
> problem. The recommended solution was this:
>
> 1. Rebuild your squid with -disable-internal-dns
> 2. Change /etc/hosts to list your real webservers IP for
> www.something.nl <http://www.something.nl/>
> 3. Modify /etc/nsswitch.conf to prefer files over NDS for host lookups.
> 4. Change squid.conf to httpd_accel_host www.something.nl
> <http://www.something.nl/>
>
> I've done all of this, and now when I try to go to www.deepcanyon.com
> <http://www.deepcanyon.com/> (on a test system) I get the following error
> message from Squid:
>
> "The requested URL could not be retrieved

Do you have this pesky thing called "nscd" (name service cache daemon)
running on your system? If so, kill it and don't use it anymore, or edit
/etc/nscd.conf to have the following line set to "no":

enable-cache hosts no

Hope it helps...
Eelco

/* Eelco M. Glasl <emglasl@gmx.net>, ICQ: 52029132, AIM: EMGlasl */
int m,u,e=0;float l,_,I;main(){for(;1840-e;putchar((++e>907&&942>e?
61-m:u)["\n >ten.xmg@lsalgme< lsalG .M ocleE"]))for(u=_=l=0;79-(m=
e%80)&&I*l+_*_<6&&26-++u;_=2*l*_+e/80*.09-1,l=I)I=l*l-_*_-2+m/27.;}
Received on Thu Mar 23 2000 - 01:51:11 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:52:21 MST