Nginx + php5-fpm + Symfony2 = "File not found."
SUMMARY: My issue was wrong file permissions. The official symfony2 config for nginx is OK. I moved my files to an NTFS Storage drive, and it seems during the move file permissions were changed.
-
chown loostro:www-data -R /media/Storage/project
- change owner to loostro and group to www-data (loostro is my user under which I develop the app, php5-fpm runs as www-data), recursively -
chmod 755 -R /media/Storage/project
- change file permissions for project to rwx (owner) rx (group, other), recursively -
cd /media/Storage/project
enter my project directory -
chmod 775 -R app/cache app/logs web/uploads private/uploads
- change file permissions for uploadable directories rwx (owner,group) and rx (other), recursively -
chmod g+s -R /media/Storage/project
- keep user and group & file permissions for newly created files in directories, recursively