How-to articles, tricks, and solutions about FASTCGI
Nginx serves .php files as downloads, instead of executing them
There are several reasons why Nginx may serve PHP files as downloads instead of executing them.
nginx: connect() failed (111: Connection refused) while connecting to upstream
This error message can have several causes.
Prevent nginx 504 Gateway timeout using PHP set_time_limit()
You can use the set_time_limit() function in PHP to increase the maximum execution time of a PHP script.