can't start Apache 1.3 server in freeBSD 4.9 release #0

Dirk-Willem van Gulik dirkx at
Mon Sep 13 01:31:00 PDT 2004

On Sun, 12 Sep 2004, Sujit Dey wrote:

>, but using "/usr/local/sbin/apachectl start", can't start
> the Apache server. It is giving httpd can not be started. I followed

> [alert] mod_unique_id: unable to gethostbyname()

Set the hostname in /etc/rc.conf (add 'hostname='' in the
/etc/rc.conf file),

	# /etc/rc.conf

and/or add it to the /etc/hosts file as

	# /etc/hosts
	::1 localhost localhost

and/or edit /usr/local/etc/apache/httpd.conf and uncomment and set the
value in 'ServerName' in the top 1/3 of the file:

	# ServerName allows you to set a host name which is sent back to clients for
	# your server if it's different than the one the program would get (i.e., use
	# "www" instead of the host's real name).
	# Note: You cannot just invent host names and hope they work. The name you
	# define here must be a valid DNS name for your host. If you don't understand
	# this, ask your network administrator.
	# If your host doesn't have a registered DNS name, enter its IP address here.
	# You will have to access it by its address (e.g.,
	# anyway, and this will make redirections work in a sensible way.
	# is the TCP/IP local loop-back address, often named localhost. Your
	# machine always knows itself by this address. If you use Apache strictly for
	# local testing and development, you may use as the server name.


More information about the freebsd-questions mailing list