Open a terminal to edit /etc/apache2/httpd.conf

$ sudo vi /etc/apache2/httpd.conf

Search for the variable “ServerName” in the editor. If commented, uncomment it and add it to the httpd.conf file

ServerName localhost

Then, restart the web server.

$ sudo service apache2 restart

Now, the below error will cease to exist.

AH00558: httpd: Could not reliably determine the server’s fully qualified domain name, using ServerName.local. Set the ‘ServerName’ directive globally to suppress this message