Forum OpenACS Q&A: Mysterious refusal to connect to localhost by http

I have setup a fully working acs on a server which initially allowed
me to connect from the browser on the server itself. Suddenly I found
that the server refused the connection when made from a browser on
the server itself. The site works perfectly when I connect from any
other location or machine. It only won't play ball when I try to
connect to the appropriate ip and port on the machine itself i.e.

If I ping I get a response. Can anyone help me to work
out what is going on? What am I missing.

The error report is connection refused by server.

what happens when you "telnet 8001"?
is the machine connected to the network while you're doing this?

What I'm thinking is that maybe ForceHostP is set to true (it is true by
default) and that your web browser is being redirected to a name that dns
can't resolve because you aren't connected to the network.

I am not sure whether your problem relates to mine, but I had encountered a similar problem on my machine and the only way I resolved it was to specify the ip address of the machine both as hostname and host addres in nsd.tcl
ping to your address won't tell you something interesting because it does that to your network card...

try /sbin/ifconfig and check if you have the loopback running like this:
lo        Link encap:Local Loopback
          inet addr:  Mask:
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:5345 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5345 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0

if you don't see it try restarting your box or check your nsd.tcl as Paul suggested!