If your apache2 outputs this warning when starting, read along how to fix it:
1 2 3 |
* Starting apache2 …
apache2: apr_sockaddr_info_get() failed for HOSTNAME
apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName |
Problem is that Apache2 is told to use a hostname that the system can not resolve.
Simple solution is to put HOSTNAME to the /etc/hosts file, like this:
1 2 |
127.0.0.1 localhost
1.2.3.4 HOSTNAME |
If you have the problem that your /etc/hosts is ignored, check this article:
Linux: /etc/hosts gets ignored