0

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.

1
  • Your nginx setup lacks the support for PHP... doublecheck you have your /etc/nginx/php.conf in place and included in your server configuration Commented Dec 8, 2012 at 16:12

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.