Using php5-fpm and nginx in a debian machine
I am trying to set up an nginx server to run a php application in debian. I followed this tutorial among others. Most seem the same. My recent configuration is based on the link above. When I try to run this php script,
<?php
phpinfo();
?>
I am getting the same output in the browser instead of the php info result. Please help me figure out where I went wrong.
Note. My error logs are clean, only contain information about starting the nginx server.
Thank.
source to share
You might want to make sure php5-fpm is listening on the correct port that you expect to use. Make a list of netstat and see if php-fpm is listening on port 9000:
netstat -tulpn
You should see a line that looks something like this:
tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN 2390/php-fpm.conf
If not, check your www.conf file (in / etc / php5 / fpm / pool.d / www.conf) and look for the line "listen = ..." and make sure it says:
listen = 127.0.0.1:9000
I've seen default php5-fpm configurations using socket instead of tcp port.
source to share