Catching 400, 404 Errors FCGI

I am trying to understand how to catch 400 and 404 errors being returned
back from my FCGI server;

How do I specify a custom error page?

I tried

error_page 404 400 /404.html;
location = /404.html {
root /app/www/aderet.net/;
}

But it still returns the FCGI Error page?

Any ideas what I may be doing wrong?

Thanks.

Hello!

On Tue, Jul 05, 2011 at 11:43:11PM -0400, David J. wrote:

    }

But it still returns the FCGI Error page?

Any ideas what I may be doing wrong?

fastcgi_intercept_errors on;

http://wiki.nginx.org/HttpFcgiModule#fastcgi_intercept_errors

Maxim D.