美文网首页
502 Bad Gateway --- 2021-08-03

502 Bad Gateway --- 2021-08-03

作者: 一位先生_ | 来源:发表于2021-08-04 09:10 被阅读0次

我根据这个(https://bbs.vpser.net/thread-1144-1-1.html)去解决,最终也没解决

最后分析原因:
我的情况是没有监听php-fpm中9000端口导致的
解决给 php-fpm.conf 中的
listen = /tmp/php-cgi.sock 后添加 listen = 9000


image.png

然后重启php-fpm

service php-fpm restart

完美解决

或者你的可能是用户组的问题可检查你的用户组

Nginx启动用户和工作用户不一致

ps aux | grep "nginx: worker process" | awk '{print $1}'

运行结果:
www
root

修改Nginx 配置文件

vim /etc/nginx/nginx.conf

将 user www www; 修改为 user root root ; 重启Nginx
注意:Nginx的启动用户和工作用户可以不一致,但是要配好网页目录的权限,让工作用户有访问网页目录的权限

chmod -R 777 /home/wwwroot/default/tp6

相关文章

  • http 状态码 502 和 504 有什么区别

    502 Bad GatewayThe server was acting as a gateway or prox...

  • Mac 10.11.6 + 502

    各种502报错502 Bad Gateway 502 https://blog.csdn.net/m0_37482...

  • 502 Bad Gateway --- 2021-08-03

    我根据这个(https://bbs.vpser.net/thread-1144-1-1.html[https://...

  • 502 Bad Gateway

    各位看官,网站打不开是不是很捉急;昨天小编的网站出现了502 bad gateway,“bad gateway”百...

  • Nginx 502错误原因和解决办法总结

    一、NGINX 502错误排查NGINX 502 Bad Gateway错误是FastCGI有问题,造成NGINX...

  • 502 Bad Gateway

    1.错误网关,无效网关 2.原因:对用户访问请求的响应超时造成的 3.首要排查:尝试清除浏览器缓存 4.解决办法:...

  • 502 Bad Gateway

    一天开发同事说,周末在家用你的运维工具查不出欧美地区的游戏服日志,然后直接截图给我看502 Bad Gateway...

  • 502 Bad Gateway

    重现 在部署一套新的环境的时候,内部集群服务之间调用采用http协议,通过nginx进行跳转调用,当内部服务1调用...

  • Valet 502 Bad Gateway

    安装valet访问后出现 502 Bad Gateway 错误,查看~/.valet/Log/nginx-erro...

  • CDN 502错误

    502错误,百度百科上的解释 中文名 502 外文名 502 Bad Gateway 属性 网关/代理 意义 无响...

网友评论

      本文标题:502 Bad Gateway --- 2021-08-03

      本文链接:https://www.haomeiwen.com/subject/gupevltx.html