You are here

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

Submitted by Druss on Mon, 2007-01-01 03:38

Setting up apache 2 on my Kubuntu box lead to the following error whenever I restarted the daemon:

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

The fix is to edit the conf file and add in the ServerName setting (as the error message requests). In other words,

sudo vi /etc/apache2/httpd.conf

followed by adding the following string:,

# ServerName is to be specified to avoid warning during reload
ServerName MYSERVER

I am not entirely sure about the status of the httpd.conf (vs. apache2.conf where the above line can also be inserted) file in Debian based distros.. Is it deprecated or something?

Either way, I thought it best to avoid editing the apache2.conf file directly and use an included file.

Comments

Thanks :) Was getting annoyed by the warning every time I rehashed or restarted apache. This sorted it :)

It works strangely..

It should just use the ServerName entry in the site-config under sites-available/,
but that didn't do the thing...

Only adding it to httpd.conf did removed the message...
Perhaps a little bug?

Thank you very much.

Thank you very much, it was annoying to get this message still appearing.