When Apache is running in Ubuntu, one might get this message while starting or stopping the service. First of all this isn’t error! It’s just a friendly warning. How to get rid of this? Instructions below.
13.04 and older
If you insert a
/etc/apache2 and restart apache the notice will disappear.
If you have a name inside
/etc/hostname you can also use that name instead of
And it uses
127.0.1.1 if it is inside your
127.0.0.1 localhost 127.0.1.1 myhostname
If you get this:
apache2: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
then use a text editor such as “sudo nano” at the command line or “gksudo gedit” on the desktop to create a new file,
sudo nano /etc/apache2/conf.d/fqdn
gksu "gedit /etc/apache2/conf.d/fqdn"
to the file and save.
But on Ubuntu 14.04:
echo "ServerName localhost" | sudo tee /etc/apache2/conf-available/fqdn.conf sudo a2enconf fqdn
Don’t forget the “.conf” (without will not work).