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
Post Description: how to fix could not determine the servers fully qualified domain name Linux Hosting
Post Tags:
This Post Has Been Viewed 44060 Times Since Thu Jul 20, 2006 9:44 am Author
toyer with 32 replies
Next Post »»
How To Find What Apache Version Is Installed In My Server How To Fix: Could not determine the server's fully qualified domain name
Advertise On This Page
I am getting this error everytime I try to restart my apache server. i have a dedicated server for my wallpaper website and im able to login to my fedora/redhat server through my ssh shell, but i get this when i try to restart my server for some reason i can't figure and my wallpaper website is down. this is what i get when i execute the commnad:
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?
Links Related to : How To Fix: Could not determine the server's fully qualified domain name
Comments and replies About How To Fix: Could not determine the server's fully qualified domain name
::
1 ::
Reply #9 Reply By
toyer On Thu Jul 20, 2006 9:51 am
toyer:
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.
::
2 ::
Reply #255 Reply By
piwi On Thu Feb 08, 2007 3:27 am
piwi:
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
::
3 ::
Reply #467 Reply By
Nithin, On Mon Feb 19, 2007 6:08 pm
Nithin,:
I am also facing the same prob but the above reply dint worked for me plz can anyone help me
::
4 ::
Reply #473 Reply By
piwe On Mon Feb 19, 2007 8:03 pm
piwe:
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
::
5 ::
Reply #4449 Reply By
Kike On Mon May 28, 2007 1:39 am
Kike:
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.
::
6 ::
Reply #11794 Reply By
MerlinGuy On Fri Jul 20, 2007 11:37 am
MerlinGuy:
thanks.
that worked great.
::
7 ::
Reply #18409 Reply By
nihat On Sun Sep 02, 2007 4:14 am
nihat:
it's a verry good
it work !!!
thanks
::
8 ::
Reply #32081 Reply By
burf On Tue Dec 18, 2007 12:12 am
burf:
thanks kike, it worked for me too
::
9 ::
Reply #43986 Reply By
helper On Mon Mar 03, 2008 12:22 am
helper:
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
::
10 ::
Reply #43988 Reply By
var On Mon Mar 03, 2008 12:39 am
var:
http://tgrove.com/2007/12/02/httpd-apr_sockaddr_info_get-failed-for-hostname/
::
11 ::
Reply #44285 Reply By
Boomer On Wed Mar 05, 2008 6:58 am
Boomer:
ah it was /etc/hosts.
thanks
::
12 ::
Reply #44354 Reply By
Hoddi On Wed Mar 05, 2008 3:37 pm
::
13 ::
Reply #53139 Reply By
Jim On Thu May 08, 2008 10:35 pm
Jim:
/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.
and for me, clean shutdown & startup.
thanks
jim
::
14 ::
Reply #53448 Reply By
lsfamily On Sun May 11, 2008 7:21 pm
lsfamily:
my god!! it worked for me.
thanks
::
15 ::
Reply #54332 Reply By
tl On Mon May 19, 2008 1:51 am
tl:
set "servername xxx" in your apache configures.
in the command line "hostname xxx.domainname "
restart apache
::
16 ::
Reply #56945 Reply By
nombre On Sun Jun 08, 2008 3:50 am
nombre:
looks like that fixed worked for all of you, however just encountered an issue with some sites being hosted as virtual machines with esx.
the website was hosted on a load balancer so if mahcine fails 2 would take over. for some reason apache had no route to the servername. it had to start at the vm, go through the host, and then out to the network.
did not have enough time to dig into the issue, however a soft reboot fixed it right up.
::
17 ::
Reply #58533 Reply By
allgarbage On Fri Jun 20, 2008 6:24 am
allgarbage:
just add or change the servername option in your apache config file. on my debian/apache2 system the file i had to modify is /etc/apache2/apache2.conf. i added this line:
servername thugone
and then restarted apache, which started without the error.
if that doesn’t work, make sure that whatever you defined as the servername is specified in your /etc/hosts file:
127.0.0.1 thugone localhost
::
18 ::
Reply #61764 Reply By
Marquinhos On Mon Jul 14, 2008 7:19 pm
Marquinhos:
look this...
arthurfurlan.org/blog/2007/10/08/co
::
19 ::
Reply #62878 Reply By
Bernardo On Tue Jul 22, 2008 1:45 pm
Bernardo:
espectacular, funciono bien en mi red hat 9.
::
20 ::
Reply #69085 Reply By
Oscar On Tue Sep 02, 2008 5:56 am
Oscar:
edita el archivo /etc/hosts (fedora core) y reemplaza "localhost.localdomain" por el nombre de tu máquina "nombre.dominio "
::
21 ::
Reply #75265 Reply By
Bruno On Mon Oct 13, 2008 7:12 am
Bruno:
just set "servername yourservername" in httpd.conf
example: "servername localhost"
::
22 ::
Reply #75380 Reply By
smokin On Mon Oct 13, 2008 11:14 pm
smokin:
edit the httpd.conf (usually found at /etc/httpd/conf/httpd.conf) and change the servername entry to the name of hostname of your system. you can find the hostname by issuing the hostname command from a terminal session.
also check to see that you have a localhost entry in your hosts file (/etc/hosts).
::
23 ::
Reply #75867 Reply By
TonyMontana On Fri Oct 17, 2008 8:28 am
TonyMontana:
stfw or from root type "hostname localhost", if you own a domain then "hostname mydomain "
::
24 ::
Reply #75869 Reply By
TonyMontana On Fri Oct 17, 2008 8:28 am
TonyMontana:
stfw or from root type "hostname localhost", if you own a domain then "hostname mydomain "
::
25 ::
Reply #84868 Reply By
tilde On Fri Dec 05, 2008 9:22 am
tilde:
i also was getting this could not reliably determine the servers fully qualified domain name, using 127.0.0.1 for servername
::
26 ::
Reply #89336 Reply By
Pez On Fri Jan 09, 2009 6:47 am
Pez:
hello ! to fix this problem edit /etc/hosts and add next line
::1 localhost localhost.my.domain your domain
127.0.0.1 localhost localhost.my.domain your domain
::
27 ::
Reply #100596 Reply By
Marouane On Fri Apr 17, 2009 6:19 am
Marouane:
hello, you can fix that by adding nameserver "hostname" in /etc/apache2/apache2.conf
hostname is the name of your machine.
::
28 ::
Reply #100597 Reply By
Marouane On Fri Apr 17, 2009 6:25 am
Marouane:
sorry guys it's servername "hostname" not nameserver "hostname". i had the same problem and after adding that line in the end of the file i don't receive that message when i reload or restart apache2. good luck
::
29 ::
Reply #107617 Reply By
bobkins On Sat Jun 27, 2009 11:10 pm
bobkins:
good! that works for me. thanks!!!
::
30 ::
Reply #114583 Reply By
Abbas On Thu Sep 03, 2009 12:34 am
Abbas:
i had a similar problem
i had originally setup apache with php 5.3.0 and later had gone on to change the php version to php 5.2.10. after the transition i could not restart the server, even after correctly specifying the php-config path and other intricacies.
i finally got apache to restart by just renaming the php 5.3.0 folder to something else :)
::
31 ::
Reply #126335 Reply By
Mike On Wed Jan 20, 2010 11:18 am
Mike:
Excellent! this works great on fedora 12!
::
32 ::
Reply #129169 Reply By
rahma On Tue Mar 02, 2010 1:06 am
rahma:
Starting httpd: httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
I want the answer now