No entry for hostname (Apache)

Hi there, I'm new to FreeBSD and Unix.

I'm using FreeBSD 7.1 and am trying to configure Apache 5.0 on my FreeBSD box. I keep getting this error in /var/log/httpd-error.log

mod_unique_id: unable to gethostbyname("")


and am unable to get Apache to start. I sort of understand the group of files this error deals with, but I don't understand why I'm getting no paramaters in gethostbyname().


typing in ]$ hostname

comes up empty also


I'm just setting up this server for use with machines on my local network, so I don't have a domain to enter, and have been using my local network IP address in all the configuration files.

Anyway, any human input on this might stop me from going premature grey. :)

Thanks
 
Sysinstall can be also be used for this task. Go to Configure −−> Networking −−>Interfaces −−> "your NIC".
 
Does a ping to the hostname work?
You might need to add a hostname reference to the ip of the httpd server in /etc/hosts like

192.168.0.1 myserver myserver.my.domain
 
joel@ said:
Put:
Code:
hostname="your.domain.here"
into /etc/rc.conf and reboot.



Thanks, this fixed it.

I had the /etc/rc.conf entry as

hostmame="192.xxx.x.x"

But forgot to reboot the machine.

After reboot this morning, Apache was up and running. Thanks for everyone's help.
 
Back
Top