title: 502 Bad Gateway nginx (1.9.7) in Homestead [ Laravel 5 ]
body: <p>Did google and various other search engines but still could not sort it out. 
  Here is my scenario: </p>
  
  <blockquote>
    <p>Larave 5 on homestead</p>
  </blockquote>
  
  <p>1) <code>ps -eo pid,comm,euser,supgrp | grep nginx</code>
  [following is the output ]</p>
  
  <blockquote>
    <p>2333 nginx           root     root
     2335 nginx           vagrant  adm,cdrom,sudo,dip,www-data,plugdev,lpadmin,sambashare,vagrant</p>
  </blockquote>
  
  <p>2) Based on some search result, did make the following on : <code>/etc/php/7.0/fpm/pool.d</code></p>
  
  <blockquote>
    <p>listen.owner = www-data <br>
    listen.group = www-data <br>
    listen.mode = 0660</p>
  </blockquote>
  
  <p>3) Output with sudo service php7.0-fpm restart</p>
  
  <blockquote>
    <ul>
    <li>Restarting PHP 7.0 FastCGI Process Manager php-fpm7.0                                                                                                                     [ OK ]</li>
    </ul>
  </blockquote>
  
  <p>4) Output with <code>sudo service nginx restart</code></p>
  
  <blockquote>
    <p>nginx stop/waiting <br>
    nginx start/running, process 2650</p>
  </blockquote>
  
  <p>5)output with : </p>
  
  <pre><code>sudo /etc/init.d/nginx restart
  </code></pre>
  
  <blockquote>
    <ul>
    <li>Restarting nginx nginx                                                                                                                                                    [fail]</li>
    </ul>
  </blockquote>
  
  <p><code>
  6)output with:</code> <code>tail -f /var/log/nginx/error.log</code></p>
  
  <pre><code>&gt; 2015/12/26 15:35:23 [notice] 2088#2088: signal process started
  2015/12/26 15:45:23 [notice] 2266#2266: signal process started
  2015/12/26 15:45:23 [alert] 2095#2095: *9 open socket #3 left in connection 5
  2015/12/26 15:45:23 [alert] 2095#2095: aborting
  2015/12/26 15:49:02 [alert] 2303#2303: *1 open socket #3 left in connection 3
  2015/12/26 15:49:02 [alert] 2303#2303: aborting
  2015/12/26 16:00:39 [notice] 2475#2475: signal process started
  2015/12/26 16:02:25 [notice] 2525#2525: signal process started
  2015/12/26 16:03:08 [notice] 2565#2565: signal process started
  2015/12/26 16:14:45 [notice] 2645#2645: signal process started
  </code></pre>
  
  <p>`
  I am just having bad time with this 502 Bad Gateway </p>
  
  <pre><code>&gt; nginx/1.9.7
  </code></pre>
  
  <p>and php </p>
  
  <pre><code>&gt; PHP 7.0.1-1+deb.sury.org~trusty+2 (cli) ( NTS )
  </code></pre>
  
  <p>`
  If anyone can please help me move on with this situation, that would be great. And, thank you in advance. </p>