Incase you use apache and you face the following error when restarting apache or during any other time, then this tutorial should help you solve that issue.This is how the error looks like
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName

Here's the solution for it

Step 1 : Go to the terminal and type sudo gedit /etc/apache2/apache2.conf
Step 2 : Text editor should now open with the apache2.conf file
Step 3 : Now look for the following line in that file (Ctrl + F to search)
ServerRoot "/etc/apache2"
Step 4 : And add the following line to it
ServerName "localhost"
Step 5 : So now it should look like this
ServerRoot "/etc/apache2"
ServerName "localhost"

NOTE:Please do not add the # character before the line.
Step 6 : Save the file and close
Step 7 : Back in the terminal type sudo /etc/init.d/apache2 restart
Step 8 : Thats it!!You shouldnt see that error anymore!! And you should be able to access your webserver through either http://127.0.0.1 or http://localhost or http://yourcomputername

0 comments

Post a Comment