title: Raspbian owncloud nginx [error] 2667#0: *4 connect() failed (111: Connection refused) while connecting to upstream
body: <p>I am using a Raspberry pi to host a owncloud server. It uses nginx, and when I configured the pi with <a href="http://pimylifeup.com/raspberry-pi-owncloud/" rel="nofollow noreferrer">this tutorial</a>, the page came up with a 502 Bad Gateway error.  I checked the logs and found this:</p>
  
  <blockquote>
    <p>2015/10/22 05:18:03 [error] 2667#0: *4 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.1.101, server: 192.168.1.102, request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.1.102", referrer: "<a href="https://192.168.1.102/" rel="nofollow noreferrer">https://192.168.1.102/</a>"</p>
  </blockquote>
  
  <p>EDIT: Nevermind this question anymore, I have moved on to using a different platform. However, I am still urious as to what this problem is.</p>
  
  <p>I tried to fix it with several other solutions found in posts on this site like <a href="https://stackoverflow.com/questions/21524373/nginx-connect-failed-111-connection-refused-while-connecting-to-upstream">here</a> and <a href="https://stackoverflow.com/questions/15852884/nginx-connect-failed-error">here</a>, as well as ensuring that php was installed, but none worked. I am stumped as I am a relative newbie to linux and know nothing about nginx.  Any help is appreciated. Thanks in advance.</p>