Update: It seems that all response codes I specify in error_page are intercepted by NGINX but do not pass to the /404.html location to render the custom error page. -- Posted via http://www.ruby-forum.com/.