Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The Question:

I keep getting this error on all apache2 restarts I have on my box here at my home, and I cannot figure out how to get rid of it:
* Restarting web server apache2
apache2: Could not reliably determine the server's fully qualified domain name, using for ServerName

Any suggestions as to how I can get rid of this?

Included files / updates


share|improve this question
it's possible your hosts file is messed up. what are the contents of /etc/hosts? – RolandiXor Apr 15 '11 at 2:42
@RolandTaylor: updated. – Thomas Ward Apr 15 '11 at 3:09
Now I won't call myself an expert, but I don't see an entry for, which is normally there by default. Maybe you need to add an entry for it (but I will wait till someone can confirm this). To my knowledge your system will be expecting such an entry to supply the host name for the system. – RolandiXor Apr 15 '11 at 3:14
up vote 5 down vote accepted

Edit this file:

sudo vim /etc/apache2/httpd.conf

And put this line in there:

ServerName localhost

Apache is throwing the error as it doesn't, by default, have a ServerName configured.

share|improve this answer
That got rid of the error, thanks much. – Thomas Ward Apr 15 '11 at 4:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.