I run the curl command via SSH and I receive the code output from that file. I browse to the page that uses that file and receive the gateway error. Posted at Nginx Forum: http://forum.nginx.org/read.php?2,233519,233532#msg-233532