c2ed [Solved] No entry for hostname (Apache) - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Server & Networking > Web & Network Services

Web & Network Services Discussion related to network/web services such as apache, bind, sendmail, etc.

Reply
 
Thread Tools Display Modes
  #1  
Old April 11th, 2009, 05:54
JasonB JasonB is offline
Junior Member
 
Join Date: Apr 2009
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
Default 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
Reply With Quote
  #2  
Old April 11th, 2009, 06:39
joel@'s Avatar
joel@ joel@ is offline
Administrator
 
Join Date: Sep 2007
Location: Arentorp, Sweden
Posts: 240
Thanks: 2
Thanked 37 Times in 30 Posts
Default

Put:
Code:
hostname="your.domain.here"
into /etc/rc.conf and reboot.
Reply With Quote
  #3  
Old April 11th, 2009, 12:35
Android1's Avatar
Android1 Android1 is offline
Junior Member
 
Join Date: Mar 2009
Posts: 14
Thanks: 3
Thanked 0 Times in 0 Posts
Default

Sysinstall can be also be used for this task. Go to Configure −−> Networking −−>Interfaces −−> "your NIC".
Reply With Quote
  #4  
Old April 11th, 2009, 12:58
MG's Avatar
MG MG is offline
Member
 
Join Date: Nov 2008
Location: Netherlands
Posts: 191
Thanks: 5
Thanked 15 Times in 11 Posts
Default

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
Reply With Quote
  #5  
Old April 11th, 2009, 14:01
JasonB JasonB is offline
Junior Member
 
Join Date: Apr 2009
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by joel@ View Post
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.
Reply With Quote
Reply

Tags
apache 5.0, gethostbyname, hostname

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Installation from FTP: cannot resolve hostname ftp... Erratus Installing & Upgrading 20 June 29th, 2010 18:25
Apache bamcis Web & Network Services 14 March 8th, 2009 01:09
Apache, SSLMutex? bliz0r Web & Network Services 1 February 12th, 2009 07:36
Apache reload Enter4 Web & Network Services 3 January 28th, 2009 21:33


All times are GMT +1. The time now is 20:11.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0