Welcome! Log In Create A New Profile

Advanced

Re: fastcgi_pass / error page /error code in HTTP rsp

Francis Daly
June 09, 2015 03:36AM
On Mon, Jun 08, 2015 at 08:13:03PM -0400, nginxuser100 wrote:

Hi there,

> Hi, I expected fastcgi_intercept_errors to return a static error page AND to
> have include the HTTP error code (e.g. 400) in the HTTP response header.

That's what it does, unless you break it by doing unnecessary things in
your error_page directive.

> From what I see, it returns the static error page but with 200 OK.

error_page 400 = /bad_request.html;

What do you think the "=" means?

What does the documentation say that the "="
means? (http://nginx.org/r/error_page)

Can you think of a way of rephrasing the documentation so that it would
have been clearer to you, so that the next person will not have the
same problem?

What happens when you leave out the "=" and reload the config?

> Is it the expected behavior?

It is what you have configured nginx to do, so yes.

> If yes, is there a way to have nginx return the error page and the error
> code to the client?

Configure it according to the "common" examples in the documentation,
not according to the special-case examples.

Good luck with it,

f
--
Francis Daly francis@daoine.org

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

fastcgi_pass / error page /error code in HTTP rsp

nginxuser100 June 08, 2015 03:14PM

Re: fastcgi_pass / error page /error code in HTTP rsp

Maxim Dounin June 08, 2015 03:26PM

Re: fastcgi_pass / error page /error code in HTTP rsp

nginxuser100 June 08, 2015 05:52PM

Re: fastcgi_pass / error page /error code in HTTP rsp

nginxuser100 June 08, 2015 08:13PM

Re: fastcgi_pass / error page /error code in HTTP rsp

nginxuser100 June 09, 2015 12:29AM

Re: fastcgi_pass / error page /error code in HTTP rsp

Francis Daly June 09, 2015 03:36AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 157
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready