Error_page at http context

I can’t get error_page override default error pages when using it in
HTTP
context (rather than server {} / location {}).
Can someone share a real-world working example?

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,259592,259592#msg-259592

On Fri, Jun 12, 2015 at 07:13:08PM -0400, iamnginxer wrote:

Hi there,

I can’t get error_page override default error pages when using it in HTTP
context (rather than server {} / location {}).

What did you try?

Can someone share a real-world working example?

http://nginx.org/r/error_page

==
http {
error_page 404 /404.html;
server {
listen 8080;
}
}

$ echo my-404 > html/404.html

$ curl http://127.0.0.1:8080/not-there
my-404

f

Francis D. [email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs