This works for a static file, yes? So this is a problem with how PHP is being served.
Please post more of your configuration, particularly for how you're serving PHP, and the contents of the error log for those requests
Please post more of your configuration, particularly for how you're serving PHP, and the contents of the error log for those requests