Re: [greenstone-users] XP weirdness and localhost

From Rene Schrama
DateWed, 11 Feb 2004 09:45:19 +0100
Subject Re: [greenstone-users] XP weirdness and localhost
OK thanks for the info.
Btw I do agree and am aware that it will only work for the local
computer, but it works in my particular situation: creating and
distributing a CD-ROM meant for use on a single PC. Possibly with a
dynamic IP number (in my case: LAN with DHCP server).

Rene


>>> "John R. McPherson" <jrm21@cs.waikato.ac.nz> 10-02-2004 20:06:38
>>>
On Tue, Feb 10, 2004 at 11:05:24AM +0100, Rene Schrama wrote:
> Finally found a more permanent solution for the DNS problem (more
> specifically dynamic IP numbers, e.g. DHCP). In the hosts file, I
mapped
> my computer name to 127.0.0.1. To meet different network
configurations,
> it's probably best to add both the long (domain name appended) and
short
> version. The long version works for me but the short version might
work
> for others. Btw I don't know a lot about networking so if there are
any
> experts out there please help me out if I'm saying something utterly
> stupid here...
>
> Example hosts file:
>
> 127.0.0.1localhost
> 127.0.0.1my_computer
> 127.0.0.1my_computer.my_domain.com
>
> The location of the hosts file can differ between Windows versions
but
> you can use Hosts Editor (
http://www.ngweb.biz/software/hostsedit.shtml
> ) to edit the hosts file without knowing it's location. Only users
with
> admin rights can edit the hosts file.


On earlier versions of windows (eg 95, 98, ME?), this file is
C:Windowshosts (there is a sample file called hosts.sam). On
NT-based versions of windows (NT, 2000, XP) it is in
C:winntsystem32driversetchosts. (Replace c:winnt and c:windows
with whatever directory windows is installed in).

But putting entries in this file will only work for that particular
computer, and not for any other computers that might be on your
network.

127.0.0.1 on any computer (windows, linux, mac, etc) is a special IP
address that always refers to the local computer. If you want other
computers on the network to be able to talk to your computer, you
either need to use the network IP address, or make sure that the DNS
settings for your network are working correctly.

Hope this helps
John McPherson