Linode Forum Index Linode Forum
Linode Community Forums
 


problem starting apache server on linode

Click here to go to the original topic

 
       Linode Forum Index -> Web Servers and Web App Development
Author Message
OrionXI



Joined: 29 Jun 2003
Posts: 18

Posted: Thu Jul 24, 2003 4:45 pm    Post subject: problem starting apache server on linode  

I installed apache version 1.3.26 woody using apt-get, but the server won't start. I type the command "apachectl start" and it says "httpd could not be started". In the apache error.log it says:

[alert] mod_unique_id: unable to gethostbyname("(none)")

Any clues? Thanks.
Back to top  
antelope



Joined: 09 Jul 2003
Posts: 11

Posted: Thu Jul 24, 2003 6:29 pm    Post subject:  

Your system hasn't been assigned a hostname yet. You must do that prior to starting Apache. Type

Code:
hostname your-hostname


and put your-hostname in /etc/hostname.
Back to top  
rndinit9



Joined: 23 Jan 2005
Posts: 6

Posted: Sat Jan 29, 2005 6:54 am    Post subject:  

Here is what I get from /var/log/apache/error

Code: mod_unique_id: unable to gethostbyname("node.tribalsage.com")

If i type hostname: node.tribalsage.com

Apache still wont start
Back to top  
pclissold



Joined: 24 Oct 2003
Posts: 855
Location: Netherlands

Posted: Sat Jan 29, 2005 10:10 am    Post subject:  

Apache can't resolve the IP address that matches your host name.

You need to put at least this in your /etc/hosts: Code: 127.0.0.1          localhost
aaa.bbb.ccc.ddd    hostname.domain.tld    hostname
Back to top  
rndinit9



Joined: 23 Jan 2005
Posts: 6

Posted: Sat Jan 29, 2005 3:07 pm    Post subject:  

Im sure that would have fixed it. But as soons as the DNS info propogated apache managed to start up.

Thanks =)
Back to top  
pclissold



Joined: 24 Oct 2003
Posts: 855
Location: Netherlands

Posted: Sat Jan 29, 2005 3:54 pm    Post subject:  

Apache Documentation wrote: don't configure Apache in such a way that it relies on DNS resolution for parsing of the configuration files
Check this out - httpd.apache.org/docs-2.0/dns-caveats - to avoid reliability problems (e.g. http server fails to start if DNS query times out during config file parsing) and possible DoS vulnerabilities with Apache.

Putting your own IP and host in /etc/hosts is the best way round this.
Back to top  
 
       Linode Forum Index -> Web Servers and Web App Development
Page 1 of 1