httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Owen Boyle <...@bourse.ch>
Subject Re: connection refused
Date Wed, 10 Apr 2002 09:44:57 GMT
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


Mime
View raw message