5

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!

Pure.Krome
  • 6,508
  • 18
  • 73
  • 87

2 Answers2

4

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

BMDan
  • 7,249
  • 2
  • 23
  • 34
  • 3
    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
  • 1
    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 03 '10 at 13:02
0

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.

Khaled
  • 36,533
  • 8
  • 72
  • 99