# Undocumented error\_page bug/feature/behavior

**URL:** <https://www.ruby-forum.com/t/undocumented-error-page-bug-feature-behavior/157066>\
**Category:** NGINX\
**Created:** [January 7, 2009, 12:54am UTC](https://www.ruby-forum.com/t/undocumented-error-page-bug-feature-behavior/157066 "2009-01-07T00:54:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonny](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/47e85d/32.png) [@jonny](https://www.ruby-forum.com/u/jonny)\
**Post date:** [January 7, 2009, 12:54am UTC](https://www.ruby-forum.com/t/undocumented-error-page-bug-feature-behavior/157066/1 "2009-01-07T00:54:41Z")

</div>

i just discovered this after 2 hours of testing

If you define error\_page for a server block multiple times, only  
the first one will take, subsequent ones will not override

That means if you store your error pages in a macro, to override it  
would be:

```
error_page 503 /503.error
include /usr/local/nginx/_macros/error_page.conf;

```

and not

```
include /usr/local/nginx/_macros/error_page.conf;
error_page 503 /503.error

```

I’m not sure if this was intended or not ( personally , i don’t like  
it ).

but I wanted to share this with others.

---

<div class="post-metadata">

**Author:** ![jonny](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/47e85d/32.png) [@jonny](https://www.ruby-forum.com/u/jonny)\
**Post date:** [January 7, 2009, 10:38pm UTC](https://www.ruby-forum.com/t/undocumented-error-page-bug-feature-behavior/157066/2 "2009-01-07T22:38:31Z")

</div>

I take it error\_page.conf resets the error\_page for 503? What happens  
if  
you try with something like “error\_page NNN = @location;”?

---

<div class="post-metadata">

**Author:** ![jonny](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/47e85d/32.png) [@jonny](https://www.ruby-forum.com/u/jonny)\
**Post date:** [January 8, 2009, 3:32am UTC](https://www.ruby-forum.com/t/undocumented-error-page-bug-feature-behavior/157066/3 "2009-01-08T03:32:43Z")

</div>

HI everybody  
Happy New Year!  
do nginx has the modules like apache’s mod\_cband ?  
i want to use it in a virtual host
