Apache – Could Not Reliably Determine the Server’s Fully Qualified Domain Name

apache-2.2

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 127.0.0.1 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?

Best Answer

check your /etc/hosts file. It should look something like this:

127.0.0.1     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.