Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 08-15-2006, 01:02 PM   #16
Registered: Aug 2006
Posts: 74

Rep: Reputation: 15

Actually this error won't stop the server from starting and serving web pages. You have a problem which is breaking your server _and_ your hostname is not set with the ServerName directive.

I have one that runs fine and gets this error, that's how I got to this thread 8)

I set the ServerName directive with the same name that gets returned with the command:
[ etc]# hostname

and server is now quiet. As well, it still works. If your server is registered in dns, you don't need to do this.

Getting back to the server not starting...
How do you know it's not starting?
Can you see it in your process list?
Can you browse it from the local machine?

If you can't see it in the process list it's really crashing. There should be some pertinent information in the error log.

What happens if you do an
[ etc]# apachectl start
[ etc]# apachectl --configtest

Does it print something like:
(98)Address already in use: make_sock: could not bind to address
no listening sockets available, shutting down
Unable to open logs

If so it means the server is in fact running and you have an apache host configuration issue that's not letting you browse it, or you are typing the wrong stuff in the browser. This error from configtest means server won't start because it's configured to bind to port 80 and it can't bind to port 80 because 80 is already in use (most likely by the apache process that's running.

hope this helps.

I'll follow up if you provide more diagnostic info.


Last edited by rg.viza; 08-15-2006 at 01:16 PM.
Old 09-21-2006, 08:52 AM   #17
LQ Newbie
Registered: Jan 2005
Posts: 1

Rep: Reputation: 0
edit the httpd.conf file

Under section 2: main server configuration.

unhash # ServerName ....:80

and change the name after the ServerName to your FQDN name.

( hou can type hostname at the command line to see you server name)

in my case it is ServerName UHS:80
Old 09-23-2006, 12:04 AM   #18
Registered: Oct 2004
Location: Jamaica
Distribution: Ubuntu 6.0.6 (Dapper Drake)
Posts: 59

Rep: Reputation: 15
Originally Posted by bulliver
This is not right. The hostname of a machine should not be a FQDN, that is what /etc/hosts is for. In your case it looks like you want to run 'hostname foo' at the command line and put a line such as:
<ip address> foo
in /etc/hosts.

This all depends on you actually owning the '' domain, and having DNS pointing to the ip address you are running apache on, which I suspect you don' cannot make up an arbitrary ServerName using a FQDN

If you just want to play around with apache on your local system then you should have just put "ServerName localhost" in httpd.conf (actually it's there, just commented out). All apache is telling you with that error is that it didn't find a ServerName in your conf file, so it is using the default ( is the same as 'localhost'). It should still work fine, and you should be able to navigate to or http://localhost/ and see the test page.

PS: ServerName doesn't belong in /etc/hosts, it goes in httpd.conf
thanks for the info.. helpt alot
Old 01-05-2007, 03:34 PM   #19
LQ Newbie
Registered: Sep 2003
Distribution: Fedora 5, Ubuntu 6 (ppc), RHE3
Posts: 4

Rep: Reputation: 0
I had the same problem.. fixed it like this:

vi /etc/apache2/apache2.conf
.. then add to the end of the file:

# ServerName
.. save & quit... restart apache:

/etc/init.d/apache2 stop
/etc/init.d/apache2 start
Hope it helps
Old 02-21-2007, 11:34 AM   #20
LQ Newbie
Registered: Feb 2007
Location: Spain
Distribution: debian etch
Posts: 13

Rep: Reputation: 0
I had the same message when I started apache2 server, and I added in my /etc/apache2/apache2.conf file the line:

as antken mentioned above, restarted the server and it didn't print out this ugly message anymore.

Old 04-05-2007, 11:13 AM   #21
LQ Newbie
Registered: Apr 2007
Posts: 1

Rep: Reputation: 0
hi there. i've recently installed apache2 and am getting the same. my hostname and the servername in the default config are both the same (i added the servername to the server config) . have i missed a step?
Old 04-08-2007, 03:09 AM   #22
LQ Newbie
Registered: Apr 2007
Posts: 1

Rep: Reputation: 0

I have the similar problem. However, my setup might be slightly different from what I have read. I run one box with several (named based) virtual servers. I am not sure, but I think the Apache message started to appear after I did a Debian apt-get upgrade, which upgraded mostly everything on my server...

The functionallity is ok, even though the Apache message keeps comming.

The Apache.conf-file is setup with no global ServerName-directive. I don't want a fallback if a lookup fails. Instead, I have a NameVirtualServer *:80 which servers as a catch-all directive. Then, I have one VirtualHost-block for each of the virtual servers. Inside this block I have the ServerName directive which corresponds to the virtual server. This setup works ok, but as I said, the Apache-message "suddenly" keeps comming up, and I don't know why... :|

One more thing, though, for the curious. To have name-based virtual servers work as I described, you have to put the names of the virtual servers in your hosts file. Since Apache uses reverse lookup to find out it's server name, I also configured bind/named to be a local authorative on the LAN network. This also has to do with Sendmail, which is rather strict on lookups.

If someone has any comment or hunch to where to start looking, please post!

Old 04-09-2007, 02:21 AM   #23
LQ Newbie
Registered: Mar 2005
Location: India
Distribution: Fedora Core 6 (Kernel 2.6.20-1.2933.fc6)
Posts: 3

Rep: Reputation: 0
I am using fedora 6... but this should be applicable to all.

Go to System --> Administration --> Network

(that's same as the good old redhat-config-network)

go to the dns tab and enter the hostname as localhost.localdomain

now go to hosts ... and edit the hostnames as u like.

now edit the httpd.conf and add the line

ServerName yourservername

and lastly edit the line canonicalname

CanonicalName On

... and there u have it.... it will work from anywhere in da world wid ur ip .. AND u get ur own server name
Old 05-13-2007, 06:52 AM   #24
LQ Newbie
Registered: May 2007
Distribution: ubuntu, slackware, gentoo
Posts: 3

Rep: Reputation: 0
syddel, that worked for me too!

thanks a bunch
Old 07-05-2007, 03:26 PM   #25
Registered: Dec 2006
Posts: 271

Rep: Reputation: 31
I read the whole thread and tried following some of the instructions people suggested. Unfortunately, none of them worked for me. Here is my set-up:

I own, but since I'm running apache on my laptop, I don't have a
stable ip address to point the domain name to.

Here is some information about the set-up:
me@laptop0:~/slackbuilds/packages$ cat /etc/HOSTNAME
me@laptop0:~/slackbuilds/packages$ cat /etc/hosts
# hosts         This file describes a number of hostname-to-address
#               mappings for the TCP/IP subsystem.  It is mostly
#               used at boot time, when no name servers are running.
#               On small systems, this file can be used instead of a
#               "named" name server.  Just add the names, addresses
#               and any aliases to this file...
# By the way, Arnt Gulbrandsen <> says that
# should NEVER be named with the name of the machine.  It causes problems
# for some (stupid) programs, irc and reputedly talk. :^)

# For loopbacking.               localhost      laptop0

# End of hosts.

me@laptop0:~/slackbuilds/packages$ grep ServerName /etc/apache/httpd.conf 
# ServerName allows you to set a host name which is sent back to clients for
# to the server the response is coming from) it will use ServerName and
#    ServerName
me@laptop0:~/slackbuilds/packages$ su 
root@laptop0:/home/me/slackbuilds/packages# apachectl restart
httpd: Could not reliably determine the server's fully qualified domain name, using for ServerName
Old 07-06-2007, 04:10 AM   #26
LQ Newbie
Registered: Feb 2007
Location: Spain
Distribution: debian etch
Posts: 13

Rep: Reputation: 0
I've a dynamic IP, too, and in my /etc/hosts file I didn't include the 'fully qualified domain name' like your laptop0. For localhost, I have only a line like: localhost laptop0
and, in my /etc/apache2/apache2.conf I've added the line like:
Old 07-09-2007, 08:21 AM   #27
Registered: Dec 2006
Posts: 271

Rep: Reputation: 31
I've tried setting it up just like you said. My /etc/hosts now has only one line:
Code: localhost laptop0
and httpd.conf ServerName attribute is set to, but I still get the same message.
Old 08-16-2007, 03:24 AM   #28
LQ Newbie
Registered: Aug 2007
Distribution: FreeBSD 6.0
Posts: 7

Rep: Reputation: 0
apache mod ssl on freebsd

all, need your help for the problem
i am installing snort @ freebsd6
however stuck on the apache.
i successfully installed apache+mod_ssl-1.3.37+2.8.28, however when starting the apache (./apachectl start), it gives just nothing.
no error though, but not running as well

#./ status
apache is not running

#./apachectl status
lynnx: not found

any ideas/solutions?

thanks before
0 members found this post helpful.
Old 08-16-2007, 08:49 AM   #29
Senior Member
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
any ideas/solutions?
Yes, post your own topic.
0 members found this post helpful.
Old 08-20-2007, 02:22 AM   #30
LQ Newbie
Registered: Aug 2007
Distribution: FreeBSD 6.0
Posts: 7

Rep: Reputation: 0
sorry guys..
0 members found this post helpful.


apache, could, domain, error, fully, httpd, name, servers

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
squid FATAL: Could not determine fully qualified hostname. Please set 'visible_hostn tarakthakor Linux - Networking 5 12-04-2010 05:29 AM
Fully Qualified Domain Name tumana Linux - Networking 4 06-10-2004 02:58 AM
Apache: httpd: Could not determine the server's fully qualified domain name.. shirtboy Linux - Software 1 11-20-2003 03:47 AM
Fully Qualified Domain Names? MasterC Linux - Networking 7 05-19-2003 01:38 PM
http: can't could not determine the servers fully qualified domain name, using 127xyz s7nner Linux - Newbie 4 05-05-2003 06:18 PM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:16 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration