Homestead中第一个Laravel项目502 Bad Gateway
来源:互联网 发布:数据库 substring 编辑:程序博客网 时间:2024/05/22 12:58
访问:http://homestead.app/
出错如下:
502 Bad Gateway
nginx/1.11.1
解决:
①最后查看错误日志(/var/log/nginx/.log)
②发现这个错误:
2017/11/09 15:37:26 [crit] 970#970: *25 connect() to unix:/var/run/php/php7.1-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: 192.168.10.1, server: homestead.app, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.1-fpm.sock:", host: "192.168.10.10"
③分析错误信息,发现是没有php7.1-fpm.sock这个文件
④查看php版本(php -v),当前环境中安装的是PHP7.0
⑤查看fpm的配置文件(/etc/php/7.0/fpm/pool.d/www.conf),发现listen = /run/php/php7.0-fpm.sock
⑥修改nginx配置文件(/etc/nginx/sites-available/)
fastcgi_pass unix:/var/run/php/php7.1-fpm.sock;
改成
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
⑦重新加载Nginx和php-fpm
sudo service nginx reload
sudo service php7.0-fpm reload
阅读全文
0 0
- Homestead中第一个Laravel项目502 Bad Gateway
- Homestead nginx 502 Bad Gateway
- 502 bad gateway
- Apache 502 Bad Gateway
- 502 bad gateway是什么意思
- 502 Bad Gateway
- 502 Bad Gateway解决办法
- 502 Bad Gateway
- nginx 502 bad gateway
- 关于502 Bad Gateway
- 502 Bad Gateway
- nginx 502 Bad Gateway
- 502 Bad Gateway nginx
- 解决:502 bad gateway
- php 502 bad gateway
- 502 bad gateway
- 解决:502 bad gateway
- nginx 502 bad gateway
- LeetCode基础-字符串-Trie
- 磁盘分区整理
- sqlitedatabase的使用
- c语言:access函数
- 个人总结30
- Homestead中第一个Laravel项目502 Bad Gateway
- 从一个窗口句柄获取IWebBrowser2和IHTMLDocument2接口
- html
- 关于JS中的继承(二)
- 【3分钟带你学】JS对象继承
- AndroidStudio 升级到3.0后输入法中文状态下无法选词解决方案
- Android SVG 和 VectorDrawable 的基本知识
- 第9章 机器学习实战之树回归
- Python SQLite3使用