There are two things to be aware of here:
1. fastcgi_param HTTPS on; - add this to your location ~ \.php$ {}.
2. If you use php-fpm chroot set:
fastcgi_param SCRIPT_FILENAME $fastcgi_script_name;
fastcgi_param PATH_TRANSLATED $fastcgi_script_name;
Thats because your document root will be just /, but only if your chroot dir = your actual site dir.