Today, while performing some mainenance on one of my Debian GNU/Linux servers, I needed to restart Apache.
While logged in as the root user, I used the following command:
test:~# /etc/init.d/apache2 restart
When this command had finished running, I was presented with the following message:
Restarting web server: apache2apache2: Could not reliably determine the server's fully qualified domain name, using fu.bar.com for ServerName
[Thu Jul 21 09:40:00 2011] [warn] NameVirtualHost 10.0.0.1:80 has no VirtualHosts
... waiting apache2: Could not reliably determine the server's fully qualified domain name, using fu.bar.com for ServerName
[Thu Jul 21 09:40:00 2011] [warn] NameVirtualHost 10.0.0.1:80 has no VirtualHosts
What do you mean, could not reliably determine the server’s fully qualified domain name (FQDN)?
Well, it seems the default configuration of the /etc/apache2/httpd.conf file, is blank.
The fix, is just as easy.
In a Debian GNU/Linux terminal, logged in as the root user, type:
test:~# pico /etc/apache2/httpd.conf
then press the [enter] key. The pico editor will open the httpd.conf file.
In Kubuntu’s Konsole, type:
test:~# sudo pico /etc/apache2/httpd.conf
then press the [enter] key. The pico editor will open the httpd.conf file.
Simply add the following line to the httpd.conf file.
ServerName localhost
Save the file and restart Apache.
No more “Could not reliably determine the server’s fully qualified domain name” message.