When I do:
$ sudo service apache2 restart
it will print the following messages:
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
... waiting .apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[ OK ]
How to fix the problem?
$ sudo vi /etc/apache2/apache2.conf
Add the following line to this configuration file:
ServerName yourservername
And then try again:
$ sudo service apache2 restart
* Restarting web server apache2 ... waiting [ OK ]