Press enter to see results or esc to cancel.

Could not reliably determine the server’s fully qualified domain name, using … for ServerName

If you have installed a LAMP configuration on Ubuntu you may encounter the following error when you restart apache2 with the command “sudo /etc/init.d/apache2 restart”:

apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName

To fix the error you need to do the following:

1. Edit the httpd.conf file which is empty by default:

sudo gedit /etc/apache2/httpd.conf

2. Once inside gedit add the following line to the blank file:

ServerName localhost

3. Hit Save and then exit the editor.

4. Finally, restart the server to see that the error is really gone:

sudo /etc/init.d/apache2 restart

Thanks to russenreaktor and aslamnajeebdeen for the fix.

Tags

Comments

Leave a Comment