apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for

  1. Add ServerName localhost as the last line in /etc/apache2/apache2.conf file.

  2. Create a file named /etc/apache2/conf-available/servername.conf and add the string ServerName localhost inside and save it. Create a soft link under /etc/apache2/conf-enabledas follows

    ln -s /etc/apache2/conf-available/servername.conf .
    # or
    a2enconf servername
    

and restart the server.

The string localhost can be replaced with any valid domain name (ie. example.com).

你可能感兴趣的:(apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for)