Oops... I take it back, it works... Ignorant me had one more line few lines above the said code: error_page 500 504 =500 @error50x; Solved now... Thanks :) Posted at Nginx Forum: http://forum.nginx.org/read.php?2,224764,224777#msg-224777