How to fix Apache – “Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName” Error on Ubuntu

ubuntu_apache_error
You might probably faced the same following error while you were restarting the Apache server on Ubuntu.

aslam@aslam:~$ 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
... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName

To fix that problem, you need to edit the httpd.conf file. Open the terminal and type,

sudo gedit /etc/apache2/httpd.conf

By default httpd.conf file will be blank. Now, simply add the following line to the file.

ServerName localhost

Save the file and exit from gEdit.

Finally restart the server.

sudo /etc/init.d/apache2 restart

Related Articles

Tags: , , ,

This entry was posted on Friday, April 17th, 2009 at 4:54 am and is filed under Apache, How to, Ubuntu. You can follow any responses to this entry through the RSS 2.0 feed.

You can leave a response, or trackback from your own site.