Proxy requests return 404 when backends down how to return appropriate 50x error?

Ezra Zygmuntowicz ezmobius at gmail.com
Sat Dec 30 03:58:25 MSK 2006


Hello there-

	I am using a standard nginx config for proxying to mongrel for rails  
apps. I have this for error pages:

     error_page   500 502 503 504  /50x.html;
     location = /50x.html {
       root   html;
     }

	But when my backend mongrels are down nginx always returns a 404  
instead of a 500x error. Do I need to catch the 404 from proxy going  
down and show my own error? Or is there something I am missing. Do  
all failed proxy requests return 404 instead of 502 or 503?

Thanks-
-- Ezra Zygmuntowicz 
-- Lead Rails Evangelist
-- ez at engineyard.com
-- Engine Yard, Serious Rails Hosting
-- (866) 518-YARD (9273)









More information about the nginx mailing list