Mailing List Archive

Support open source code!


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

Re: Apache fails to start under RH7.1



On Mon, Jul 16, 2001 at 12:30:04PM -0000, Jean-Christian Imbeault wrote:
> >The purpose of /etc/hosts is to get an IP address, given a
> >hostname.
> 
> Ok. But what if this machine only has a private IP? Can I just give a name 
> and not a FQDN?

Yep, but why are you worried about it only having a private IP? If there is
nothing else on the network and the machine isn't connected to anything,
then why bother having an interface up? If there is a network with other
machines on it, then names rather than IP addresses are a good way of
finding things, so why not give it a name and put it in DNS (on your
intranet). If you don't want anyone to know about the machine, then just
give it a private name in /etc/hosts and don't bother with DNS. The machine
will be happy aslong as it knows who it is and so long as no other machine
comes a long and uses the same name with a different ip address in DNS and
the machine is looking at DNS first... confused? Just stick it in DNS too.
It reserves the name and the ip and helps avoid future problems with
possible conflicts etc.

> >The entry in /etc/sysconfig/network tells the host what its
> >name is.
> 
> So why can't I put that in /etc/hosts also then? Just asking, not 
> complaining (yet) :)

Quit complaining !!! :) Basically because /etc/hosts is basically a database
of names and matching ip addresses. It's format is "ip maps to hostname". It
doesn't know or care what your machine is called. Its there solely for
the purpose of "if you give me a name, I'll give you an address". Why
can't I put my square object into this star shaped hole? Basically people
used to describe whole networks in /etc/hosts and it became unmanageable,
hence DNS was thought up as a more organised way through the clutter. These
days /etc/hosts *should* be a pretty simple file containing just the
addresses a machine needs to know about to function properly before 
networking starts or because parts of the network can go down. So, OSs
typically have described the hostname elsewhere. RH just happens to 
set it in /etc/sysconfig/network.

Maybe I should have written that in python. My English sucks...

Tom.
-- 
Thomas O'Dowd. - Nooping - http://nooper.com
tom@example.com - Testing - http://nooper.co.jp/labs


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links