Resolved: Apache “Could Not Reliably Determine the Server’s Fully Qualified Domain Name”

While installing Apache 2 on my Linux server, which runs Ubuntu 10.10, I came across this error:

chris@chrism-laptop:~$ sudo /etc/init.d/apache2 restart
* Restarting web server apache2
apache2: Could not reliably determine the server's fully qualified domain name,
using 127.0.1.1 for ServerName

To solve this problem simply issue this command:

sudo gedit /etc/apache2/httpd.conf

The file will be blank by default so don’t worry! Type this into the blank document and save:

ServerName localhost

Now, issue the restart command for apache.

sudo /etc/init.d/apache2 restart

Hope this helps!