I am new to nginx, and having some trouble with php5. (I had it sorta working, but cant seem to get it working again.) There are 2 files I am woring with, that seem to control nginx, and php5-fpm. /etc/php5/fpm/pool.d/www.conf /etc/nginx/nginx.conf
From the php5 www.conf file:
;listen = /var/run/php5-fpm.sock
listen = 127.0.0.1:9000
from the nginx conf file:
# fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_pass 127.0.0.1:9000;
when both are set to 127.0.0.1:9000 php pages load blank pages, and this error in
/var/log/nginx/error.log
2015/09/05 09:06:29 [error] 20085#20085: *1 connect() failed (111: Connection refused) while connecting to upstream, client: <ip>, server: , request: "GET /server.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "address"
when both are set to /var/run/php5-fpm.sock webpages display "Bad gateway", and this error in
/var/log/nginx/error.log
: <ip>, server: , request: "GET /server.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "address"
2015/09/05 09:07:14 [crit] 20189#20189: *3 connect() to unix:/var/run/php5-fpm.sock failed (2: No such file or directory) while connecting to upstream, client
php had been working, with the exception that it was only *.php files loaded, where php tags were broken, when inside htm/html files. Now all of it is busted. like an idiot, I did not back up my original config files. Can someone help me get php5 working? This is a debian, jessie server. What should I do to fix this?