If you are getting the following error:
Restarting web server apache2
apache2: Could not reliably determine the server's fully qualified domain name,
using 127.0.1.1 for ServerName
... waiting apache2:Could not reliably determine the server's fully
qualified domain name, using 127.0.1.1 for ServerName
This is just a friendly warning and not really a problem it simply means that your hosts file does not include a valid FQDN(fully qualified domain name), nor is localhost an FQDN.(as in that something does not work).
If you insert a
If you have a name inside
And it uses
If you insert a
ServerName localhost
in either httpd.conf or apache2.conf in /etc/apache2 and restart apache the notice will disappear. If you have a name inside
/etc/hostname you can also use that name instead of localhost. And it uses
127.0.1.1 if it is inside your /etc/hosts: 127.0.0.1 localhost
127.0.1.1 myhostname
Preferred methodTroubleshooting ApacheIf you get this error:
apache2: Could not determine the server's fully qualified domain name,
using 127.0.0.1 for ServerName
then use a text editor such as "sudo nano" at the command line or "gksudo gedit" on the desktop to create a new file,sudo nano /etc/apache2/conf.d/fqdn
orgksu "gedit /etc/apache2/conf.d/fqdn"
then addServerName localhost
to the file and save. This can all be done in a single command with the following: echo "ServerName localhost" | sudo tee /etc/apache2/conf.d/fqdn
Share:
No comments:
Post a Comment