user1079369
user1079369

Reputation: 31

hgweb.cgi and nginx - "Connection refused"

I've followed https://www.mercurial-scm.org/wiki/HgWebDirStepByStep to get "hg serve" running over CGI - but it's not quite working.

Here is the command I'm using to spawn the CGI:

spawn-fcgi -a 127.0.0.1 -p 9000 -f /path/to/hgweb.cgi -P /tmp/fcgi.pid 2>&1

The output suggests that the process spawned successfully, but a ps -p reveals that the process has already closed down. Sure enough, when I run the above command with -n, it spits out a load of HTML (the list of repositories) and then quits. Isn't it meant to stick around, listening on port 9000?

Telnetting to port 9000 gives "Connection refused" and this appears to be the problem nginx is having also:

2012/02/15 22:16:20 [error] 13483#0: *13 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: emily, request: "GET /hg/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "localhost:8001"

I'm confident my nginx config is correct, although I can post it here if you need to take a look.

Thanks for any help :)

Upvotes: 2

Views: 655

Answers (0)

Related Questions