[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: can't access localhost



On Fri, 21 Sep 2007 12:31:42 +0200
"Martin Marcher" <martin@marcher.name> wrote:

> 2007/9/21, Liam O'Toole <liam.p.otoole@gmail.com>:
> > On Fri, 21 Sep 2007 08:32:21 +0100
> > "John O Laoi" <brianolaoi@gmail.com> wrote:
> > > # cat /etc/hosts
> > > 127.0.0.1 localhost mc
> > > 127.0.1.1 mc.home.m  mc
> >
> > I see that you solved the CUPS problem, but I should point out
> > that the hosts file above is likely to cause problems elsewhere. You
> > should remove 'mc' from the first line.
> 
> why should that cause problems?
> 
> hosts(5):
> For each host a single line should be present with the following
> information:
> 
>               IP_address canonical_hostname [aliases...]
> 
> I can't see anything here that suggests the above entry is wrong. I'd
> even say that if something should change that John should _add_
> localhost.localdomain to the 127.0.0.1 line....
> 

The issue is that 'mc' resolves to 127.0.0.1 (the first match), whereas
mc.home.m resolves to 127.0.1.1 (the only match). Thus the canonical
host name and its alias resolve to different IP addresses.

-- 

Liam



Reply to: