NGINX: connect() to unix:/var/run/php7.2-fpm.sock failed (2: No such file or directory)

前端 未结 8 1746
走了就别回头了
走了就别回头了 2021-02-07 01:05

I\'ve just recently moved my websites from apache2 to Nginx as my new web server backend. got to love problems aha.

HTML files in the web host director work prior to php

8条回答
  •  花落未央
    2021-02-07 01:52

    A possible explanation, as I just faced: the disk was full.

    Php-fpm was logging the error, and after a while the php-fpm cgi service did crash and wasn't able to restart, while my server (Caddy) was still online. (Had also a bunch of scripts writing to disc in the same time).

    This was leading to the http error 502 Bad Gateway.

    The solution is to leave a large amount of hdd space, empty the trash, empty the apt cache, and else. Make sure to find the cause of the problem, so the issue doesn't come back. Watch your logs time to time.

    Then, on my machine (use your php-fpm version):

    /etc/init.d/php7.2-fpm restart
    

    Alternatives way to restart

提交回复
热议问题