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

前端 未结 8 1678
走了就别回头了
走了就别回头了 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 02:06

    Check your php7.x-fpm.sock file to see what version they are.

    Mine was: php7.0-fpm.sock instead of php7.2-fpm.sock

    Don't forget to also change its name in /etc/nginx/site-enable/example.com

    0 讨论(0)
  • 2021-02-07 02:12

    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

    0 讨论(0)
提交回复
热议问题