If using nginx + php-fpm, does nginx need to have access to the php files?
Context: building a kuberentes pod, with two containers: nginx and php-fpm, we can built the php code into php-fpm container. It's possible to share the php files with volumes, but is it really needed?
Please correct my understanding: nginx will just forward a pre-processed request to php-fpm (using fast-cgi protocol) which will execute the script. So php-fpm needs to read php files. However I don't see the reason why would nginx need to, apart from checking if script is found or not. It could send the script name to php-fpm without accessing the php file.
Thanks