why nginx download php file?
1 Answer. When is nginx downloading the php file? If it happens when you are accessing your main site mydomain.com/foo.php , it's because your php configuration should be inside your main site's server block, not in the default server block.