can't start Apache 1.3 server in freeBSD 4.9 release #0
Dirk-Willem van Gulik
dirkx at webweaving.org
Mon Sep 13 01:31:00 PDT 2004
On Sun, 12 Sep 2004, Sujit Dey wrote:
> 127.0.0.1, 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='www.foo.com' in the
/etc/rc.conf file),
# /etc/rc.conf
...
hostname="www.foo.com"
and/or add it to the /etc/hosts file as
# /etc/hosts
::1 localhost localhost.foo.com www.foo.com
127.0.0.1 localhost localhost.foo.com www.foo.com
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:
#/usr/local/etc/apache/httpd.conf
....
#
# 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., http://123.45.67.89/)
# anyway, and this will make redirections work in a sensible way.
#
# 127.0.0.1 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 127.0.0.1 as the server name.
#
ServerName www.foo.com
....
Dw.
More information about the freebsd-questions
mailing list