Question: 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

Answer: 
If (and *only* if) the actual server has been set up with a HTTPS service in port 445, it will work. That will also mean the server must not have SMB service running in that same port.

That server had better be in a network segment with no SMB traffic in it, though, or the HTTPS server instance in port 445 might get some garbage log entries from mis-aimed SMB connection attempts. But since we're talking about load balancers, this is probably a fairly serious set-up: the server is likely to be in some sort of a DMZ network segment anyway, and so SMB traffic in that segment is likely to be non-existent or heavily restricted.

(To me, this would suggest that the server might have multiple HTTPS services: maybe first there was one in the standard port 443, then another was added in port 444, then yet another in 445...)
Using the well known port numbers to run common protocols allows clients and servers to easily interact without needing to explicitly agree and communicate beforehand on what port to connect to. 

But when you control both to client and the server there is nothing that stops you from running a service on a non-standard port. 

So yes, you can reverse proxy and load balance port 443 to port 445 if that is where the HTTPS service is running.

Please note that running **public services using non-standard ports** will frequently make them unavailable to part of your users (many firewalls will allow and/or block specific traffic based on the destination port number).  

My current hosting provider for instance actively blocks the ports for Netbios 135-139 and Port 445 for SMB as they should only be used in a LAN and not on the internet.