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

Re: [MiNT] More MiNT setup issues ;)


On Mon, Dec 11, 2000 at 09:57:06AM -0500, Noah silva wrote:
> Hello again everyone,
> Does anyone know anything about the HTTPd?
> When connecting, I get an error:
> "httpd: cannot determine local host name.  Use ServerName to set it
> manually."
> Obviously, I could set it in the the httpd configuration, but I was just
> wondering if this is really nessisary.  I have the /etc/hosts file set up
> properly, and it is set to be queried before DNS (and DNS is also set up).
> /etc/hostname is also intact.
> Any idea what httpd is actually looking for?

gethostname() is not a system call under MiNT (it should be though ...),
it is emulated by the libc.  I think it first reads /etc/hostname and then
checks the envariable $HOSTNAME (brrrrh).

You can check the implementation for gethostname() and
getdomainname() here:


getdomainname() uses more or less the same mechanism with /etc/domainname.

As you can see from the C files there must be no whitespace or comments in
these files (will both break the parser).  Older versions were even
buggier, I think they even stumbled on carriage return at the end of line.

The safest way (even for old programs) to create these files is probably
to put into your mint.cnf something like:

	exec /bin/echo -n "greasy" >/etc/hostname
	exec /bin/echo -n "hamburger.bse" >/etc/domainname
	setenv HOSTNAME "greasy"
	# setenv DOMAINNAME "hamburger.bse" # Nope, doesn't work.

You may have guessed already that you have to slightly modify theses lines
if your fully qualified host name (FQHN) is not "greasy.hamburger.bse".

Other cures for your problem:

Put your FQHN into /etc/hosts (i. e. add the FQHN as an alias for your
hostname).  Finally make sure to have "order hosts,bind" in
/etc/host.conf and "search hamburger.bse" in /etc/resolv.conf.  One or
more of these measures should have the desired effect, even for very old
versions of Apache (depends mainly on the libc version Apache is linked

If it solves the problems, fine, but I am still convinced that
gethostname, sethostname, getdomainname and setdomainname belong into the
kernel, not the libc.  The libc emulation is fine for non-MiNT.  For MiNT
things should work different.