为什么我的连接到php-fpm.sock被拒绝?

我在这里看到了一堆关于这个问题的问题,但是没有一个答案帮助我。

我不断从nginx得到一个502错误,所以我看看access.log,看到当服务器试图连接到unix:/var/run/php5-fpm.sock时,我不断收到错误111 unix:/var/run/php5-fpm.sock

我已经重新启动php5-fpm,并确保套接字实际上在那里,但我一直得到这个错误。

你们知道为什么吗?

我的nginx.conf

 user www-data www-data; worker_processes auto; error_log /var/log/nginx_error.log; pid /run/nginx.pid; events { worker_connections 1024; } http { include /etc/nginx/mime.types; default_type application/octet-stream; sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; fastcgi_buffers 8 16k; fastcgi_buffer_size 32k; gzip on; gzip_disable "msie6"; access_log /var/logs/nginx/access.log; error_log /var/logs/nginx/access.log; server { listen 80 default_server; root /var/www/app/public/; index index.php index.html index.htm =404; server_name localhost; charset utf-8; location / { try_files $uri $uri/ /index.php?$query_string =404; } location ~ \.php$ { try_files $uri /index.php =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; #fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } } } 

和这里的php-fpm.conf

php5-fpm使用SCRIPT_FILENAMEfind要解释的php文件的path。 我注意到你有这条评论。 这是一个疏忽或有这一行被转移到fastcgi_params包含文件?