为什么Perl Cgiwrap Sock拒绝连接到nginx?

任何人都可以在我的nginx错误日志中的以下行上说明一些情况。 我正试图让Perl和Nginx互相交谈,但迄今为止没有成功。

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" 

相关的nginxconfiguration。

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

我还没有遇到连接拒绝,但我的猜测是,nginx进程没有用户权限写入/var/run/nginx/cgiwrap-dispatch.sock,检查文件的权限和用户。

如果是Debian用户,最有可能是www-data。