装好lnmp环境后发现始终报502错误,日志如下:
connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) while connecting to upstream

解决办法

修改php-fpm.conf,在[www]节点下去掉listen.mode的注释或者加上listen.mode = 0666,重启php-fpm服务,故障恢复。

参考资料: php-fpm-connect-to-unixtmpphp5-fpm-sock-failed-2-no-such-file-or-directory