This problem is usually caused by an incorrect path to the Fastcgi_script_name access script.
Especially with subdirectories, for example, for YII frameworks, the path is usually project/web
Then if you access/project/index.php in the URL, then the script_name in the Nginx configuration will be the full path: project/index.php
If the code in your configuration is as follows:
Fastcgi_param script_filename $document _root$fastcgi_script_name;
Then the actual access to the file is/var/site_root/project/web/project/index.php, which is obviously not the result we want, we want to visit is/project/web/index.php.
These errors can be traced by looking at the Php-fpm.log (error log).
The workaround is to modify the appropriate path configuration.
Note: Multiple sites use subdirectory configuration to refer to:
https://rtcamp.com/wordpress-nginx/tutorials/multisite/subdirectories/in-a-subdirectory/
The above describes the NGINX/PHP-FPM access to PHP files directly downloaded without running, including aspects of the content, I hope the PHP tutorial interested in a friend helpful.