配置好 php-fpm.conf
和 nginx.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原创文章,转载无需和我联系,但请注明来自larwas博客 https://larwas.com
最新评论