Hostname configuration on DHCP/DNS server: /etc/hosts vs. /etc/hostname

Chris G cl at isbd.net
Sun Mar 27 20:30:20 UTC 2011


On Sun, Mar 27, 2011 at 04:15:44PM -0400, Tom H wrote:
> On Sun, Mar 27, 2011 at 2:23 PM, Chris G <cl at isbd.net> wrote:
> >> Please don't spread FUD!
> >>
> > I'm spreading *simplicity*!  :-)  My /etc/hosts is simpler!
> >
> >> I don't know about leafnode but apache2 doesn't break if you have
> >> "127.0.0.1 localhost.localdomain localhost" in "/etc/hosts".
> >>
> >> You have to ensure that your box is set up with either "127.0.1.1
> >> myhost.mydomain myhost" for a dhcp box or "my_fixed_ip_address
> >> myhost.mydomain myhost" in "/etc/hosts".
> >>
> > Why add all that complexity?
> 
> The way that you create your "/etc/hosts" is simpler (I also use
> "127.0.0.1 localhost") but that doesn't mean that setting up
> "/etc/hosts" as Debian and Ubuntu set it up by default breaks apache2!
> 
Well when Network Manager came along (when I upgraded from 10.04 to
10.10) and changed my /etc/hosts from my simple version to the version
with localhost.localdomain etc. in it *I* certainly got error messages
from both apache2 and leafnode complaining that they couldn't determine
the FQDN.

When I changed it back and un-installed Network Manager the error
messages went away.

-- 
Chris Green




More information about the ubuntu-users mailing list