502 Bad Gateway

502 Bad Gateway

页面报错信息:502 Bad Gateway
日志信息:

2020/05/28 01:55:29 [error] 205#0: *2 connect() failed (111: Connection refused) while connecting to upstream, client: 10.0.0.1, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "10.0.0.11:90"

原因:php-fpm 在centos6.9的系统中 使用/etc/init.d/php-fpm start 启动后是秒死的

如果没有启动php-fpm 就会保这个错误
解决:
在docker容器中启动php-fpm的方法是

php-fpm -D
原文地址:https://www.cnblogs.com/liushiya/p/13532345.html