谷歌和各种其他搜索引擎,但仍然无法解决它.这是我的场景:
宅基地上的Larave 5
1)ps -eo pid,comm,euser,supgrp | grep nginx
[以下是输出]
2333 nginx root root 2335 nginx vagrant adm,cdrom,sudo,dip,www-data,plugdev,lpadmin,sambashare,vagrant
2)根据一些搜索结果,确实做了以下几点: /etc/php/7.0/fpm/pool.d
listen.owner = www-data
listen.group = www-data
listen.mode = 0660
3)用sudo服务输出php7.0-fpm restart
重启PHP 7.0 FastCGI Process Manager php-fpm7.0 [确定]
4)输出 sudo service nginx restart
nginx停止/等待
nginx启动/运行,进程2650
5)输出:
sudo /etc/init.d/nginx restart
重启nginx nginx [fail]
6)output with:
tail -f /var/log/nginx/error.log
> 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
"我对这个502 Bad Gateway感觉很糟糕
> nginx/1.9.7
和PHP
> PHP 7.0.1-1+deb.sury.org~trusty+2 (cli) ( NTS )
"如果有人能帮助我继续这种情况,那就太棒了.并且,提前谢谢你.
最后解决了这个位置.我要感谢Miguel从laracast讨论.
您需要在以下位置更改配置文件:
/etc/nginx/sites-enabled
改变行fastcgi_pass为
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
php7.0-fpm.sock位于:
/var/run/php
由于新VM使用php 7.*,您的配置文件可能具有5.6版本的php位置.