Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Using: Squid Cache version 2.7.STABLE3 for i686-pc-winnt ...

Whatever I put into the hosts file, it seems to be ignoring it.

here's my configuration :-

hosts_file c:\windows\system32\drivers\etc\hosts

And yep - i'm restarting squid each time i change (and save) the hosts file and yep, i've 10x checked the hosts file is the same as the one listed in the config file.

Does anyone else have this problem? I'm not even sure how i can debug it. Right now, i'm using the command line squid and squidclient to try and see what's going on, but i keep getting X-Squid-Error: ERR_DNS_FAIL 0.

Please help!

share|improve this question
up vote 3 down vote accepted

Use forward slashes (/), rather than backslashes, to separate your path components.

share|improve this answer
Perfect :) the example path (in the documentation) has the backslashes :( I just copied that. ALSO .. the last entry in the hosts is not read if u do NOT have a newline after the last entry!!! FFS! So I added a comment to the end of the file # end of hosts file to make SURE all the entries get read in. WOW! #fail – Pure.Krome Oct 27 '10 at 22:42
That last little bit (regarding newlines) is a bug; have you reported it? It might not be a bad idea to also suggest either forking the sample config file per-platform, or adding comments to make it clear the direction of slashes that need to be used. – BMDan Nov 3 '10 at 13:02

Usually the best way to start debuging a problem is to look at the available log files. It can be a very good and valuable source of information to help debuging the problems.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.