When you run command apachectl -t for the first time configuring Apache Virtual Host. You may got a warning message:

httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain for ServerName
Syntax OK

This is just a friendly warning and not really a problem (as in that something does not work).

If you insert a ServerName localhost in either httpd.conf or apache2.conf and restart apache the notice will disappear.

In my case, location file is at /etc/httpd/conf/httpd.conf.

And inside your /etc/hosts, add the following lines: localhost myhostname

Apache version we use:

Server version: Apache/2.2.15 (Unix)
Server built:   Oct 16 2014 14:48:21

Hope this help!

About The Author