title: nginx: 502 error: connect() failed (111: Connection refused) with vagrant
body: <p>I'm experiencing 502 gateway errors when accessing my site on 127.0.0.1:8000
  Working with Vagrant and ubuntu with nginx, trying to install Magento 2.0. After a lot of bugfixxing I still have this 502 error.</p>
  
  <p>Config:</p>
  
  <ul>
  <li>Ubuntu 14.04 (ubuntu/trusty64 box)</li>
  <li>Php 5.6.18 from ppa</li>
  <li>Nginx 1.8.1</li>
  </ul>
  
  <p>Error log: </p>
  
  <pre><code>connect() failed (111: Connection refused) while connecting to upstream, client: 10.0.2.2, server: localhost, request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://127.0.0.1:7777", host: "127.0.0.1:8000", referrer: "http://127.0.0.1:8000/"
  </code></pre>
  
  <p>VagrantFile config: <a href="http://pastebin.com/rMSTmwJn" rel="nofollow">http://pastebin.com/rMSTmwJn</a></p>
  
  <p>my /etc/php5/pool.d/vagrant.conf (and www.conf) file: <a href="http://pastebin.com/hHnFrf55" rel="nofollow">http://pastebin.com/hHnFrf55</a></p>
  
  <p>my /etc/nginx/sites-available/default file: <a href="http://pastebin.com/0mwR7CxY" rel="nofollow">http://pastebin.com/0mwR7CxY</a></p>
  
  <p>which includes this magento nginx config file: <a href="https://github.com/magento/magento2/blob/develop/nginx.conf.sample" rel="nofollow">https://github.com/magento/magento2/blob/develop/nginx.conf.sample</a> (no edits)</p>
  
  <p>Also have I edited the user and group in www.conf to 'vagrant'</p>
  
  <p>I'm really stuck on this one. Hope you guys can help! If you need more information, please let me know.</p>