Re: [greenstone-users] XP weirdness and localhost

From Rene Schrama
DateTue, 10 Feb 2004 11:05:24 +0100
Subject Re: [greenstone-users] XP weirdness and localhost
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.

HTH

Rene


>>> "John R. McPherson" <jrm21@cs.waikato.ac.nz> 28-10-2003 23:01:35
>>>
Rene Schrama wrote:
> Hi all,
>
> I exported a collection to CD-ROM (on Windows XP) but after
> installation the homepage wouldn't display. I checked for proxies
but
> found none. Then I accidentally discovered that Greenstone was trying
to
> connect to <computer name> instead of localhost. The computer name
was
> JP12 but the host name of the user's PC was JP012. I changed it to
match
> the host name (JP012) and voila, problem solved. But if this happens
> after distribution I have no control over it, so it would be nice to
be
> able to connect to 127.0.0.1 and avoid the situation altogether. The
> problem is: how do I tell server.exe to connect to 127.0.0.1 (or
> localhost or whatever)??

The windows server uses standard functions in the win32 libraries to
resolve the machine's host name. If this gets the wrong name, then it
is almost certainly a windows client network settings issue.
I think the reasons that "localhost" wasn't used is because:
1) often stand-alone machines can't resolve the name "localhost" to an
IP
address, and
2) in a network environment, that url won't work for any machine other
than the one that the greenstone server is running on.

I don't think there is a setting anywhere to hard-code a server name
into,
unfortunately.

John McPherson