Q: apache2: Could not reliably determine the server’s fully qualified domain name, using for ServerName

A: I recently had this message showing after upgrading my apache server on my Debian and so I thought to share how I solved the problem with you guys.

anyhoo, go to apache2.conf file which is located in /etc/apache2 and then edit the file with your chosen editor and add the following line


…finally restart apache

So here it is all put together

1./ Create a back up copy of your config file, your really do not have to do this however I do it cause I’m tiny bit paranoid about things going horribly wrong. So to do this open Applications > Accessories > Terminal. Type…

sudo cp /etc/apache2/apache2.conf /etc/apache2/apache2.conf.bck

2./ Chose your editor, in this case VIM

sudo vi /etc/apache2/apache2.conf

If your are using VIM, move your cursor using the arrow keys to a blank line to insert a line and then press “i” (off-course without the double quotes).

After that, this line…


…then save the file pressing [Esc][Shift]:wq

3./ Test and restart apache

sudo apache2ctl configtest

…and then

sudo apache2ctl restart