nginx error connect to php5-fpm.sock failed (13: Permission denied)

后端 未结 25 1903
悲哀的现实
悲哀的现实 2020-11-27 09:12

I update nginx to 1.4.7 and php to 5.5.12, After that I got the 502 error. Before I update everything works fine.

25条回答
  •  半阙折子戏
    2020-11-27 09:26

    I had the similar error.

    All recommendations didn't help.

    The only replacement www-data with nginx has helped:

    $ sudo chmod nginx:nginx /var/run/php/php7.2-fpm.sock
    

    /var/www/php/fpm/pool.d/www.conf

    user = nginx
    group = nginx
    ...
    listen.owner = nginx
    listen.group = nginx
    listen.mode = 0660
    

提交回复
热议问题