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?
check your
/etc/hosts
file. It should look something like this:The first line should already be there, you only have to add the second line with your values.
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 theServerName
directive outside a vhost) it doesn't hurt to have thehostname
value set properly for the system. Use thehostname
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 ofhostname
] for ServerName".