I have PHP5-FPM installed on Debian with nginx. When I try to open a PHP page then I get
Error 502 Bag Gateway. I found out that it is because I am using sockets which looks like is not properly configured. I have tried to fix it by applying different settings but unable to solve this issue. If I change sockets to
127.0.0.1:9000 then it works fine.
Can you please check following configuration and tell me what am I doing wrong?
user = sf
group = sf
listen = /var/run/php5-fpm-sf.sock
listen.owner = sf
listen.group = sf
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
In above file I am using
/var/run/php5-fpm.sock is already being used by
srw-rw-rw- 1 sf sf 0 Aug 10 12:21 /var/run/php5-fpm-sf.sock
2017/08/10 12:37:37 [crit] 11666#0: *3 connect() to unix:/var/run/php5-fpm-sf.sock failed (13: Permission denied) while connecting to upstream, client: 126.96.36.199, server: www.sf.com, request: "GET /phptest.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm-sf.sock:", host: "sf.com"