# Catching 400, 404 Errors FCGI

**URL:** <https://www.ruby-forum.com/t/catching-400-404-errors-fcgi/209117>\
**Category:** NGINX\
**Created:** [July 6, 2011, 5:44am UTC](https://www.ruby-forum.com/t/catching-400-404-errors-fcgi/209117 "2011-07-06T05:44:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [July 6, 2011, 5:44am UTC](https://www.ruby-forum.com/t/catching-400-404-errors-fcgi/209117/1 "2011-07-06T05:44:27Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![elegant](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/3ab097/32.png) [@elegant](https://www.ruby-forum.com/u/elegant)\
**Post date:** [July 6, 2011, 9:29am UTC](https://www.ruby-forum.com/t/catching-400-404-errors-fcgi/209117/2 "2011-07-06T09:29:05Z")

</div>

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;

> **[GitHub - nginxinc/nginx-wiki: ARCHIVED -- Source for the now archived NGINX Wiki...](https://github.com/nginxinc/nginx-wiki)**
>
> ARCHIVED -- Source for the now archived NGINX Wiki section of https://www.nginx.com

Maxim D.
