# Nginx error handling/error page

**URL:** <https://www.ruby-forum.com/t/nginx-error-handling-error-page/191238>\
**Category:** NGINX\
**Created:** [July 8, 2010, 12:03am UTC](https://www.ruby-forum.com/t/nginx-error-handling-error-page/191238 "2010-07-08T00:03:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![steve\_yan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e56c9b/32.png) [@steve\_yan](https://www.ruby-forum.com/u/steve_yan)\
**Post date:** [July 8, 2010, 12:03am UTC](https://www.ruby-forum.com/t/nginx-error-handling-error-page/191238/1 "2010-07-08T00:03:48Z")

</div>

Hi,

This is a newbie question and was probably asked before.

I have an Apache web server, and nginx is used as reverse proxy server.  
In  
nginx, I need to parse the response from Apache, if the error code from  
Apache is 500, 502, 503, 504, or if the response body from Apache is  
empty,  
I will do some special processing before send the static error page to  
the  
client.

The conf has entry like this:

_error\_page 500 502 503 504 /50x.html;_

What’s the best way to do this?
