1

Could anyone shed some light on the following line in my nginx error logs. I'm trying to get Perl and Nginx talking to each other, but so far no success.

unix:/var/run/nginx/cgiwrap-dispatch.sock failed (111: Connection refused)2011/11/20 09:18:34 [error] 24054#0: *1186 connect() to unix:/var/run/nginx/cgiwrap-dispatch.sock failed (111: Connection refused) while connecting to upstream, client: 150.101.221.75, server: example.com, request: "GET /dspam.cgi HTTP/1.1", upstream: "fastcgi://unix:/var/run/nginx/cgiwrap-dispatch.sock:", host: "example.com"

The relevant nginx configs.

location ~ \.cgi$ {
        gzip off;
        include /etc/nginx/fastcgi_params;
        fastcgi_pass unix:/var/run/fcgiwrap.socket;
        fastcgi_index index.pl;
        fastcgi_param SCRIPT_FILENAME /var/www/dspam$fastcgi_script_name;
}
Emmanuel
  • 347
  • 1
  • 9
  • 20

1 Answers1

0

I haven't experience the Connection refused yet but my guess would be that the nginx process does not have the user rights to write to /var/run/nginx/cgiwrap-dispatch.sock, check the file permissions and user.

If it's a Debian user should most likely be www-data.

ZaphodB
  • 673
  • 3
  • 10