You might probably faced the same following error while you were restarting the Apache server on Ubuntu.
To fix that problem, you need to edit the httpd.conf file. Open the terminal and type,
By default httpd.conf file will be blank. Now, simply add the following line to the file.
Save the file and exit from gEdit.
Finally restart the server.
Source: 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.