Another WIFI Issue Involving WMP54G & /etc/hosts

Derek Broughton news at pointerstop.ca
Mon Feb 11 17:57:26 UTC 2008


Karl Larsen wrote:

> Leonard Chatagnier wrote:
>> My New Gateway GT5656 AMD64 X2, just installed with
>> Gutsy, without a bobble, has this in /etc/hosts:
>>
>> lchata at ubuntu64:/etc/apt$ cat /etc/hosts
>> 127.0.0.1 localhost
>> 127.0.1.1 ubuntu64.gateway.2wire.net ubuntu64
>>
...
>> Well, I don't remember ever seeing the second line
>> with 127.0.1.1, in any of my original ubuntu machines
>> on my lan. However, I've modified the hosts file in
>> them several times to resolve other issues and maybe
>> just don't remember.
>>   
>     Well I think it is important since it is the hostname and it gives
> it an ip address that works. Do not change it and do not erase it :-)
> 

Talk about the blind leading the blind.

Karl, it's NOT important to have that second line.

Many distros would have assigned multiple names to 127.0.0.1

However, since all 127.x.x.x addresses map to localhost (as I've explained
to you elsewhere) it is a convenience to add unique lines in /etc/hosts for
each name you use.

I take advantage of this for testing websites, by specifying:

127.0.1.1 bella.pointerstop.ca bella
127.0.2.1 nagisa.pointerstop.ca nagisa
127.0.2.2 plonevdc.pointerstop.ca plonevdc
127.0.2.3 nagisa2.pointerstop.ca nagisa2

Bella is my real hostname, and is the line that the Ubuntu installer
created.
Nagisa and PloneVDC are two websites I'm working on, and I can take
advantage of Apache's virtual hosts to get to the different web sites via
http://nagisa/ or http://plonevdc/ (or I can use the FQDNs for them). 
Apache's actually responding to requests on the "lo" interface - 127.0.0.1,
but gets the appropriate host name.  If I use http://localhost/ I get
something completely different.
-- 
derek





More information about the ubuntu-users mailing list