Starting httpd: httpd: Could not determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName

Posted: November 29, 2008 in Apache
Tags: , , ,

Starting httpd: httpd: Could not determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName

I am getting this error every time I try to restart my Apache server. I can able to access the PHP Pages in browser, but this is what i get when i restart my Apache server.

ERROR:

Starting httpd: httpd: Could not determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName

How to solve ?

Try the following method

# echo HOST.DOMAIN.com > /etc/hostname

HOST = Your host name
DOMAIN = Your Domain Name

Now execute the next command in the shell:

/bin/hostname -F /etc/hostname

Now that your server has a hostname and a domain name, restart your server with the following command:

/etc/init.d/httpd restart

After you have restarted your server, you shouldn’t see the error.

does this work on other linux distributions like Mandrake Mandriva Red Hat Fedora Core SuSE Linux Debian Woody Sarge Ubuntu Hoary Hedgehog Breezy Badger Dapper DrakeEdgy Eft CentOS

If you still get that error try the following commands.

you have to edit the /etc/apache2/apache2.conf and, at the end of the file, add:

# added servername to avoid the could not determine fqdn error
servername myserver

[eg: servername localhost]
Place your server name in place of myserver.

It worked for me.

Thanks
Bharath

Comments
  1. Wow enjoyed reading this blogpost. I added your rss to my blogreader!

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