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] moduniqueid: unable to gethostbyname("(none)")

Any clues? Thanks.

5 Replies

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

hostname your-hostname

and put your-hostname in /etc/hostname.

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

mod_unique_id: unable to gethostbyname("")

If i type hostname:

Apache still wont start

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

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

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

Thanks =)

@Apache Documentation:

don't configure Apache in such a way that it relies on DNS resolution for parsing of the configuration files
Check this out - - 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.


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct