7

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?

6

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.

| improve this answer | |
  • did you mean /etc/hosts? – lamcro Aug 7 '10 at 16:59
4

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

| improve this answer | |
0

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 127.0.0.1 for ServerName" with "Using [the value of hostname] for ServerName".

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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