Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

This is a warning that occurs when starting up Apache httpd. This can be seen in the error log and in the shell terminal output if using the command line to start/restart httpd ("apachectl start" or "apachectl restart").

This warning indicates that httpd was unable to determine its own name. The server needs to know its own name under certain circumstances in order to generate self-referential redirects. When UseCanonicalName is off, however, the server will use the name supplied by the client, so this warning can be safely ignored.

To eliminate the warning, make sure you have a fully-qualified ServerName defined in your main httpd configuration file (typically httpd.conf).

Examples:

ServerName foo.example.com

Or, if you don't have DNS resolution for your site, you could put your IP address there:

ServerName 111.111.111.111

Even if all requests are served by virtual hosts, you must still have a ServerName defined in the main configuration file outside the VirtualHost sections.

The presence of this error message also indicates that Apache httpd was unable to obtain a fully-qualified hostname by doing a reverse lookup on your server's IP address. While the above instructions will get rid of the warning in any case, it is also a good idea to fix your name resolution so that this reverse mapping works. For example, on many unix systems, you will want to edit your /etc/hosts file and add a valid domain (localhost.localdomain) to the 127.0.0.1 line: