Recently I installed the latest version of Nginx and looks like I\'m having hard time running PHP with it.
Here is the configuration file I\'m using for the domain:<
Probably it's too late to answer but a couple things since this is a really annoying error. Following solution worked on Mac OS X Yosemite.
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
The include with fast cgi params should go above that line.
All your directories down to the PHP file you're executing (including that file too) should have a+x
permissions, e.g.
sudo chmod a+x /Users/ sudo chmod a+x /Users/oleg/ sudo chmod a+x /Users/oleg/www/ sudo chmod a+x /Users/oleg/www/a.php
When getting "File not found", my problem was that there was no symlink in the folder where was pointing this line in ngix config:
root /var/www/claims/web;
in case it helps someone, my issue seems to be just because I was using a subfolder under my home directory, even though permissions seem correct and I don't have SELinux or anything like that. changing it to be under /var/www/something/something made it work.
(if I ever found the real cause, and remember this answer, I'll update it)