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;
}

1 Answer 1

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.

2
  • Yes, I've already checked that and the the group and user are set to www-data
    – Emmanuel
    Nov 21, 2011 at 2:28
  • Could it be that nginx is running as user nobody and group nogroup or something, and not with www-data GID?
    – adamo
    Aug 24, 2016 at 17:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .