# How does to error\_page when this issue

**URL:** <https://www.ruby-forum.com/t/how-does-to-error-page-when-this-issue/221033>\
**Category:** NGINX\
**Created:** [June 28, 2012, 2:37am UTC](https://www.ruby-forum.com/t/how-does-to-error-page-when-this-issue/221033 "2012-06-28T02:37:15Z")\
**Posts on this page:** 4\
**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:** [June 28, 2012, 2:37am UTC](https://www.ruby-forum.com/t/how-does-to-error-page-when-this-issue/221033/1 "2012-06-28T02:37:15Z")

</div>

some url like: [http://localhost.com/%u](http://localhost.com/%25u)  
It will response http 400 status , and when generate this response  
,nothing found in error log or access log.

how to config this issue error\_page?

my config  
location / {  
error\_page 400 =/400;  
}

location /400 {  
root /path/some/path;  
}  
it don’t work.

Posted at Nginx Forum:

> **[How does to error\_page when this issue](https://forum.nginx.org/read.php?2,228031,228031#msg-228031)**
>
> some url like: http://localhost.com/%u It will response http 400 status , and when generate this response ,nothing found in error log or access log. how to config this issue error\_page? my config location / { error\_page 400 =/400; }

---

<div class="post-metadata">

**Author:** ![defage](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/839c29/32.png) [@defage](https://www.ruby-forum.com/u/defage)\
**Post date:** [June 28, 2012, 12:30pm UTC](https://www.ruby-forum.com/t/how-does-to-error-page-when-this-issue/221033/2 "2012-06-28T12:30:31Z")

</div>

> how to config this issue error\_page?

Does [http://localhost/400](http://localhost/400) show correctly?

rr

---

<div class="post-metadata">

**Author:** ![defage](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/839c29/32.png) [@defage](https://www.ruby-forum.com/u/defage)\
**Post date:** [June 28, 2012, 3:48pm UTC](https://www.ruby-forum.com/t/how-does-to-error-page-when-this-issue/221033/3 "2012-06-28T15:48:01Z")

</div>

Hello!

On Wed, Jun 27, 2012 at 08:36:49PM -0400, defage wrote:

> location /400 {  
> root /path/some/path;  
> }  
> it don’t work.

These errors are shown up in a default server on a listen socket  
in question, as virtual host isn’t yet known when error happens.

The error\_page should work, though you have to configure  
it in the default server as well.

Maxim D.

---

<div class="post-metadata">

**Author:** ![defage](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/839c29/32.png) [@defage](https://www.ruby-forum.com/u/defage)\
**Post date:** [June 29, 2012, 4:18am UTC](https://www.ruby-forum.com/t/how-does-to-error-page-when-this-issue/221033/4 "2012-06-29T04:18:15Z")

</div>

Thanks your reply. Working properly now

Posted at Nginx Forum:

> **[Re: How does to error\_page when this issue](https://forum.nginx.org/read.php?2,228031,228079#msg-228079)**
>
> some url like: http://localhost.com/%u It will response http 400 status , and when generate this response ,nothing found in error log or access log. how to config this issue error\_page? my config location / { error\_page 400 =/400; }
