How To Fix: Could Not Determine The Server's Fully Qualified Domain Name
how to fix: could not determine the server's fully qualified domain name
how, to, fix, could, not, determine, the, servers, fully, qualified, domain, name
How To Fix: Could Not Determine The Server's Fully Qualified Domain Name
Post Description: how to fix: could not determine the server's fully qualified domain name
POST# 163
Posted On: Fri Feb 29, 2008 12:01 pm
toyer
Topic: How To Fix: Could Not Determine The Server's Fully Qualified Domain Name
I am getting this error everytime I try to restart my apache server.


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


how can i fix this?


Thu Jul 20, 2006 9:51 am
1
toyer
Reply #632
Loging to your Redhat server with the SSH account that was provided by our staff. Make sure you are logged in as root. If you don't have your password or forgot, please contact our support team. otherwise, execute these commands if you have your root password:


     Code:
echo HOST.DOMAIN.com > /etc/hostname

HOST = Your host name
DOMAIN = Your Domain Name

Now execute the next command in the shell:

     Code:
/bin/hostname -F /etc/hostname


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

     Code:
/etc/init.d/httpd restart


After you have restarted your server, you shouldn't see the error.
Thu Feb 08, 2007 3:27 am
2
piwi
Reply #633
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
Mon Feb 19, 2007 6:08 pm
3
Nithin,
Reply #634
I am also facing the same prob but the above reply dint worked for me plz can anyone help me
Mon Feb 19, 2007 8:03 pm
4
piwe
Reply #635
hey Nithin, send this command:

cat /etc/hostname
if you don't have a hostname, you need to give your server a good hostname and a domain name. for example: hostname.domainname.com
make sure you only have one entry, its possible that you have a corupted hostname file, so i would clear it all and run the command on this post
MAKE SURE TO RESTART YOUR SERVER
Mon May 28, 2007 1:39 am
5
Kike
Reply #636
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

place your server name in place of myserver.

it worked for me.
Fri Jul 20, 2007 11:37 am
6
MerlinGuy
Reply #637
thanks.

that worked great.
Sun Sep 02, 2007 4:14 am
7
nihat
Reply #638
it's a verry good
it work !!!
thanks
Tue Dec 18, 2007 12:12 am
8
burf
Reply #639
thanks kike, it worked for me too
Mon Mar 03, 2008 12:22 am
9
helper
Reply #640
also check this file:

/etc/hosts

make sure it matches your hostname

i was getting this error

starting httpd: httpd: apr_sockaddr_info_get() failed for hostname.domain

httpd: could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for servername

Mon Mar 03, 2008 12:39 am
10
var
Reply #641
http://tgrove.com/2007/12/02/httpd-apr_sockaddr_info_get-failed-for-hostname/
Wed Mar 05, 2008 6:58 am
11
Boomer
Reply #642
ah it was /etc/hosts.
thanks
Wed Mar 05, 2008 3:37 pm
12
Hoddi
Reply #643
thanks, it works

What do you think?

* name:  

* email:  

* Please enter comments:


Receive Replies on my Comments
(An email will be sent to you when someone replies to your comments)

Add image to comments
yes no             upload