宽屏模式

NGINX配置好php-fpm后一直502记录

配置好 php-fpm.confnginx.conf 配置后, 访问项目一直报错502:

2023/12/27 15:21:14 [crit] 9786#0: *22 connect() to unix:/tmp/run/php-cgi-74.sock failed (2: No such file or directory) while connecting to upstream, client: 127.0.0.1, server: admin.test.com, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/tmp/run/php-cgi-74.sock:", host: "admin.test.com"
127.0.0.1 - - [27/Dec/2023:15:21:14 +0800] "GET / HTTP/1.1" 502 157 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0"

经过一番查询发现, php-cgi-74.sock 不能放在 /tmp 目录下, 否则再怎么设置, 不管文件是否存在, 都会报错找不到文件.

Larwas
请先登录后发表评论
  • latest comments
  • 总共0条评论