close

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

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error NGINX: connect() to unix:/var/run/php7.2-fpm.sock failed (2: No such file or directory) in php. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

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

Today I get the following error NGINX: connect() to unix:/var/run/php7.2-fpm.sock failed (2: No such file or directory) in php.

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

  1. How To Solve NGINX: connect() to unix:/var/run/php7.2-fpm.sock failed (2: No such file or directory) Error ?

    To Solve NGINX: connect() to unix:/var/run/php7.2-fpm.sock failed (2: No such file or directory) Error Mine was inside another php folder, so:
    /var/run/php/php7.2-fpm.sock
    Ubuntu 18.04
    Php 7.2

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

    To Solve NGINX: connect() to unix:/var/run/php7.2-fpm.sock failed (2: No such file or directory) Error Mine was inside another php folder, so:
    /var/run/php/php7.2-fpm.sock
    Ubuntu 18.04
    Php 7.2

Solution 1

Make sure you have everything properly setup.

sudo apt-get install php7.2-fpm
sudo service nginx restart
sudo service php7.2-fpm restart

This will generate file /run/php/php7.2-fpm.sock

Solution 2

Mine was inside another php folder, so:
/var/run/php/php7.2-fpm.sock

  • Ubuntu 18.04
  • Php 7.2

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read

Leave a Comment