On 5 October 2012 01:11, Rosen Iliev <[email protected]> wrote: > Ville Valkonen wrote, On 10/4/2012 1:34 PM: > >> On 4 October 2012 20:36, Jiri B <[email protected]> wrote: >>> >>> On Thu, Oct 04, 2012 at 08:20:43PM +0300, Ville Valkonen wrote: >>>> >>>> Hi, >>>> >>>> I've configured Nginx and FCGI to run some C/C++ apps, well almost. >>>> >>>> When navitaging to http://host.foo/weezel/progut/default.cgi nginx's >>>> error log >>>> states the following (below there is test.c, test.c == default.cgi): >>>> >>>> 2012/10/04 16:52:22 [error] 26690#0: *14 kevent() reported that >>>> connect() >>>> failed (61: Connection refused) while connecting to upstream, client: >>>> 192.168.50.102, server: host.foo, request: "GET /weezel/progut/ >>>> HTTP/1.1", >>>> upstream: "fastcgi://127.0.0.1:9001", host: "host.foo" >>> >>> Not sure but is your dns working inside chroot? >>> >>> jirib >> >> I tried the following: mkdir /var/www/etc && cd /var/www/etc && sudo cp -p >> /etc/hosts /etc/resolv.conf . >> but no success. Any other hints? >> >> -- >> Ville >> > Hi Ville, > > Can you telnet to 127.0.0.1:9001. > > The error you've got from nginx says connection refused, which means nginx > could not connect to 127.0.0.1 port 9001. > > Rosen
Hi Rosen, "I'd say the problem lies somewhere in nginx configuration since nc 127.0.0.1 9001 let's connections in." And same with the telnet of course :) $ telnet 127.0.0.1 9001 Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. hello world Connection closed by foreign host. I also checked $ tcpdump -i pflog0 -ne to be sure it won't hit into any blocking rule.

