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

后端 未结 25 1841
悲哀的现实
悲哀的现实 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:21

    Consideration must also be given to your individual FPM pools, if any.

    I couldn't figure out why none of these answers was working for me today. This had been a set-and-forget scenario for me, where I had forgotten that listen.user and listen.group were duplicated on a per-pool basis.

    If you used pools for different user accounts like I did, where each user account owns their FPM processes and sockets, setting only the default listen.owner and listen.group configuration options to 'nginx' will simply not work. And obviously, letting 'nginx' own them all is not acceptable either.

    For each pool, make sure that

    listen.group = nginx
    

    Otherwise, you can leave the pool's ownership and such alone.

提交回复
热议问题