Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

2 Answers

up vote 3 down vote accepted

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

share|improve this answer
1  
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
add comment

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
add comment

Your Answer

 
discard

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.