You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Unix Newbie <un...@earthlink.net> on 2002/04/08 07:57:26 UTC

connection refused


 Hello all,

    I have just set up a FreeBSD 4.5 server on an older box and I set up
the latest version of apache. I have run into a configuration problem
that is stopping me from setting anything else up though. Apache
launches fine, but gets the error that it could not find a qualifing
domain name (currently I don't have one) and that it will use 127.0.0.1
(localhost). After that I can't connect to it with any machines, it just
says the connection attempt was refused.

 I have played around with the config. Binding it to my IP address
(currently, just a router assigned address, not a real one) and then
using my IP as the domain, but I don't seem to get any further. I know
the network is fine because all my other servers services (ftp, ssh,
etc) work fine. The var/log/httpd-error.log only says that it (alert)
can't find qualifing domain name. Any ideas?


  Docs, urls, pretty much anything would be appreciated! Thanks so much
for the help!

  Terry.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: connection refused

Posted by Unix Newbie <un...@earthlink.net>.
On Wed, 2002-04-10 at 02:44, Owen Boyle wrote:
> Unix Newbie wrote:
> > 
> >  Hello all,
> > 
> >     I have just set up a FreeBSD 4.5 server on an older box and I set up
> > the latest version of apache. I have run into a configuration problem
> > that is stopping me from setting anything else up though. Apache
> > launches fine, but gets the error that it could not find a qualifing
> > domain name (currently I don't have one) and that it will use 127.0.0.1
> > (localhost). After that I can't connect to it with any machines, it just
> > says the connection attempt was refused.
> 
> What do you have in your "Listen" directive?  By default, apache will
> listen to all active interfaces on port 80. But as soon as you define
> one Listen, you override this and it listens only to that which you have
> defined. Note that you can have many Listens.
> 
> One possibility is that you have "Listen 127.0.0.1" which will restrict
> listening to localhost (so obviously no network card will be listened
> to).
> 
> Another possibility is that you have "Listen *" but that your network
> card is not up (do "ifconfig -a" to see what's up).
> 
> > 
> >  I have played around with the config. Binding it to my IP address
> > (currently, just a router assigned address, not a real one) and then
> > using my IP as the domain, but I don't seem to get any further. I know
> > the network is fine because all my other servers services (ftp, ssh,
> > etc) work fine.
> 
> OK. so the NIC is up..
> 
> > The var/log/httpd-error.log only says that it (alert)
> > can't find qualifing domain name. Any ideas?
> 
> This is not really an error - it just means that apache can't find a
> domain name (e.g. www.foo-bar.com) to go with the IP address.
> 
> I would suggest you proceed as follows:
> 
> - find out the actual IP address of your machine (ifconfig -a, then look
> for eth0 or some other device IP address). Let's say you get
> 192.168.1.1...
> - set up an entry in /etc/hosts like:
> 
> 192.168.1.1	banana
> 
> now your machine should respond to the name "banana" - i.e. "telnet
> banana" will work.
> 
> - edit httpd.conf and remove any BindAddress or Port directives - these
> are superseded by "Listen".
> 
> - replace them with:
> 
> 	Listen banana:80
> 
> then restart apache and try http://banana/ on the server.
> 
> - edit /etc/hosts on other network machines so they can get banana too
> and try http://banana/ from them.
> 
> - If using the name doesn't work, you have a problem with
> name-resolution so to prove apache is OK, replace "banana" with the IP
> address in the above, i.e.
> 
> 	Listen 192.168.1.1:80
> 
> 	http://192.168.1.1/
> 
> Rgds,
> 
> Owen Boyle.

 Owen
    Hey! sorry for the e-mail back being so late, but I wanted to first
thank you for your help and second let you know what the problem ended
up being...

   I thought it was a configuration issue (as would anybody logical) but
after having a friend of a friend in Apache development and it ended up
being some sort of curruption on my origional download of apache. The
origional config file with a new biniary worked fine. Figure that.


 Anyway, thanks so much for giving me some advice!

   Terry
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: connection refused

Posted by Owen Boyle <ob...@bourse.ch>.
Unix Newbie wrote:
> 
>  Hello all,
> 
>     I have just set up a FreeBSD 4.5 server on an older box and I set up
> the latest version of apache. I have run into a configuration problem
> that is stopping me from setting anything else up though. Apache
> launches fine, but gets the error that it could not find a qualifing
> domain name (currently I don't have one) and that it will use 127.0.0.1
> (localhost). After that I can't connect to it with any machines, it just
> says the connection attempt was refused.

What do you have in your "Listen" directive?  By default, apache will
listen to all active interfaces on port 80. But as soon as you define
one Listen, you override this and it listens only to that which you have
defined. Note that you can have many Listens.

One possibility is that you have "Listen 127.0.0.1" which will restrict
listening to localhost (so obviously no network card will be listened
to).

Another possibility is that you have "Listen *" but that your network
card is not up (do "ifconfig -a" to see what's up).

> 
>  I have played around with the config. Binding it to my IP address
> (currently, just a router assigned address, not a real one) and then
> using my IP as the domain, but I don't seem to get any further. I know
> the network is fine because all my other servers services (ftp, ssh,
> etc) work fine.

OK. so the NIC is up..

> The var/log/httpd-error.log only says that it (alert)
> can't find qualifing domain name. Any ideas?

This is not really an error - it just means that apache can't find a
domain name (e.g. www.foo-bar.com) to go with the IP address.

I would suggest you proceed as follows:

- find out the actual IP address of your machine (ifconfig -a, then look
for eth0 or some other device IP address). Let's say you get
192.168.1.1...
- set up an entry in /etc/hosts like:

192.168.1.1	banana

now your machine should respond to the name "banana" - i.e. "telnet
banana" will work.

- edit httpd.conf and remove any BindAddress or Port directives - these
are superseded by "Listen".

- replace them with:

	Listen banana:80

then restart apache and try http://banana/ on the server.

- edit /etc/hosts on other network machines so they can get banana too
and try http://banana/ from them.

- If using the name doesn't work, you have a problem with
name-resolution so to prove apache is OK, replace "banana" with the IP
address in the above, i.e.

	Listen 192.168.1.1:80

	http://192.168.1.1/

Rgds,

Owen Boyle.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org