I am trying to set up nginx server to run a php app in debian. I followed this tutorial among others. Most seems the same. My recent configuration is based on the link above. When I try to run this php script,
<?php
phpinfo();
?>
I get the same output on the browser instead of php info result. Kindly someone help me figure out where I went wrong.
Note: My error logs are clean,contains details on nginx server start only.
Thank you.
You might want to make sure php5-fpm is listening on the correct port you're expecting it to be using. Do a netstat listing 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 "listen = ..." line and make sure it says:
listen = 127.0.0.1:9000
I have seen default configurations of php5-fpm use a socket instead of a tcp port.