> Has anyone got it to work so Nginx will use an actual error page instead
> of the default when encountering a Bad Request?

This is pretty easy to do, just use the "error_page" directive and
list all of the ones you want to capture and then specify it to use
your 500 page, e.g. we capture all 5xx errors using these nginx config
rules:


  error_page   500 502 503 504  /500.html;
  location = /500.html {
    root   /u/apps/project/public;
  }

Just add 400 to the list of 5xx errors. You will also want to have a
"500.html" in your document root or modify the path to the file
accordingly.

/Cody

On Wed, Jan 7, 2009 at 1:25 PM, Robbie Allen <li...@ruby-forum.com> wrote:
>> On the other hand, does Apache not allow configuring the page returned
>> for 400 Bad Request. This would
>> then also allow addressing the issue that
>
> I'm using Nginx and it does allow you to set error_pages, but that
> doesn't seem to work in this case (at least for me).
>
> Has anyone got it to work so Nginx will use an actual error page instead
> of the default when encountering a Bad Request?
>
> Robbie
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users@rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users
>
_______________________________________________
Mongrel-users mailing list
Mongrel-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-users

Reply via email to