Shammer's Philosophy

My private adversaria

Could not reliably determine the server's fully qualified domain name

When restarting apache2 in my VPS, this message is always output.

Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
 ... waiting apache2: apr_sockaddr_info_get() failed for XXXXX

XXXXX means hostname. Why this message output? I discovered Apacheのエラー:Could not reliably determine the server’s fully qualified domain name〜とメッセージが出たときの対応 - yummy-yummy as this answer.

But this blog was described for RHEL or CentOS. My distribution is Debian so there are some different points. This blog is a memo how to fix this message on Debian, but this is very simple.

  1. Check the hostname, this is a same as the last word of above warning or /etc/hostname.
  2. Edit /etc/apache2.conf to add "ServerName XXXXX:80", XXXXX means hostname as above. If https.conf is included by apache2.conf, edit https.conf is available too.