I've never encountered this error before. And secondly I'd like to know how you folks debug your apache configurations.

apache2: Could not reliably determine the server's fully qualified domain name, using for ServerName

In my Virtual Host configuration I do have these lines:

ServerName  example.com
ServerAlias www.example.com

(of course it has my actual info in there)

So I guess my question is, why wouldn’t apache be able to determine my fully qualified domain name?

3 Answers 3


check your /etc/hosts file. It should look something like this:     localhost
a.b.c.d       www.example.com

The first line should already be there, you only have to add the second line with your values.

  • did you mean /etc/hosts?
    – lamcro
    Aug 7, 2010 at 16:59

I think it's because you need to have "ServerName" declared outside vhost configuration, in the apache2.conf and the ServerName value declared in the /etc/hosts


In addition to the points already mentioned (/etc/hosts and the ServerName directive outside a vhost) it doesn't hurt to have the hostname value set properly for the system. Use the hostname command (as root or with sudo) to set it. (If you do this without doing the other two, the errors will continue, but it will replace "Using for ServerName" with "Using [the value of hostname] for ServerName".

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .