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

Re: "httpd: cannot determine local host name"



On Sun, 15 Aug 1999, André Bell wrote:

> Apache tells me "httpd: cannot determine local host name. Use the
> ServerName directive to set it manually."
> 
> Now I know ServerName is not something I can run from the command line
> because I tried it. That means there must be something else I need to type
> on the command line after typing 'apache' to define a servername(?).  
> 
> Any ideas what I've missed? The answer isn't obvious in Que's "Using
> Linux".  There are four pages of stuff about DNS and IP addresses but
> nothing specific to giving a host name to an Intranet or local machine.
> Since they say DNS is 'notoriously hard to configure' and is used for
> resolving mnemonic names that represent hosts I'm guessing it's not the
> tool for giving a name to my local host. 
> 
> How do I give my local machine a host name?

Try running "hostname" and "hostname -f".  If you get the same output
i.e. no domain shown with hostname -f, then that is the problem.  In my
case I had an entry in /etc/hosts such as
192.168.1.1	fred

instead of the correct
192.168.1.1	fred.my.domain.tld     fred

It took some finding...

HTH
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Lindsay Allen   <allen@cleo.murdoch.edu.au>  Perth, Western Australia
voice +61 8 9316 2486   32.0125S 115.8445E               Debian Linux
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


Reply to: