Search squid archive

RE: Is there any way to configure Squid to use local /etc/hosts in name resolution?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 






> Date: Wed, 26 Oct 2011 17:28:21 -0700
> From: dnwake@xxxxxxxxx
> To: squid-users@xxxxxxxxxxxxxxx
> Subject:  Is there any way to configure Squid to use local /etc/hosts in name resolution?
> 
> Hi there,
> 
> I'm using Squid 3.1 as part of a proxy chain. I'm trying to make
> Squid use the local /etc/hosts file for name resolution before
> forwarding the request to the next proxy in the chain, but I've been
> unable to make it work, even by explicitly using the hosts_file
> directive. I'd be really grateful if anyone could help!
> 
> Here's an example:
> 
> I'll access a website normally via the proxy, with no weirdness in /etc/hosts
> 
> > cat /etc/hosts
> 127.0.0.1 localhost.localdomain localhost
> > echo $http_proxy
> http://localhost:3128
> > curl http://yahoo.com
> The document has moved <A HREF="http://www.yahoo.com/";>here</A>.<P>
> <!-- w33.fp.sk1.yahoo.com uncompressed/chunked Wed Oct 26 17:12:17
> PDT 2011 -->
> 
> 
> Now I'll change /etc/hosts to point yahoo.com to google.com. Notice
> that the proxy doesn't respect this: it still goes to yahoo.com
> rather than google.com.

> 
DNS responses are cached both by squid and local resolver. Are you reloading squid at this point? My 3.2 works fine with /etc/hosts mods
 
I am assuming order is alright in /etc/resolv.conf (judging from the tests below I will say it is).
 
Jenny 		 	   		  


[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux