Apache is one of commonly used web servers in Linux. At the time modifying apache, you need to restart it for updating the modifications without restarting Linux. Sometimes, we may face with the following troubleshooting:
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 service apache2 restart
Or use the instructions:
sudo /etc/init.d/apache2 restart