Q: apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1 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

ServerName 127.0.0.1

…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…

ServerName 127.0.0.1

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

3./ Test and restart apache

sudo apache2ctl configtest

…and then

sudo apache2ctl restart

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s