# Problem with own error pages in nginx 1.3.5

**URL:** <https://www.ruby-forum.com/t/problem-with-own-error-pages-in-nginx-1-3-5/222410>\
**Category:** NGINX\
**Created:** [August 27, 2012, 3:59pm UTC](https://www.ruby-forum.com/t/problem-with-own-error-pages-in-nginx-1-3-5/222410 "2012-08-27T15:59:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [August 27, 2012, 3:59pm UTC](https://www.ruby-forum.com/t/problem-with-own-error-pages-in-nginx-1-3-5/222410/1 "2012-08-27T15:59:12Z")

</div>

I have a problem with my own error pages with nginx 1.3.5.

```
[CODE]...
error_page 401 402 403 404 /40x.html;
location = /40x.html {
     root /www/default/html;
}
...[/CODE]

```

With Firefox is all OK.

With IE 8 and IE 9 the browser is unable to show me the an error-site  
from  
the webserver. The error-site from the IE browser is shown.

with

```
[code]...
error_page 401 402 403 404 /40x.html;
location = /40x.html {
     root /html;
}
...[/code]

```

the browser show me the error-site from nginx. I change the  
configuration in  
nginx to

```
[code]...
error_page 401 402 403 404 /40x.html;
location = /40x.html {
     root /www/default/html;
}
...[/code]

```

and restart nginx. Than I push F5 and the browser shows my error-site.  
When  
I call again the website with the brower, the browser is unable to show  
the  
error-site from the webserver. The browser error-page is shown again.

Varix

Posted at Nginx Forum:

> **[Problem with own error pages in nginx 1.3.5](https://forum.nginx.org/read.php?2,230147,230147#msg-230147)**
>
> I have a problem with my own error pages with nginx 1.3.5. \[CODE\]... error\_page 401 402 403 404 /40x.html; location = /40x.html { root /www/default/html; } ...\[/CODE\] With Firefox is all OK.

---

<div class="post-metadata">

**Author:** ![varix](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/e8c25b/32.png) [@varix](https://www.ruby-forum.com/u/varix)\
**Post date:** [September 1, 2012, 12:36pm UTC](https://www.ruby-forum.com/t/problem-with-own-error-pages-in-nginx-1-3-5/222410/2 "2012-09-01T12:36:59Z")

</div>

Hello!

On Mon, Aug 27, 2012 at 09:58:19AM -0400, Varix wrote:

> ```
> ...[/code]
> 
> ```
> 
> and restart nginx. Than I push F5 and the browser shows my error-site. When  
> I call again the website with the brower, the browser is unable to show the  
> error-site from the webserver. The browser error-page is shown again.

How big your error page is? Note that IE won’t show pages less  
than 512 bytes, it will show his own page instead.

For builtin error pages nginx adds some padding bytes to make sure  
error pages are bigger than 512 bytes, see  
[Module ngx\_http\_core\_module](http://nginx.org/r/msie_padding).  
For your own pages you should take care of this yourself.

Maxim D.
