Welcome! Log In Create A New Profile

Advanced

Re: internal and error_page directives

Maxim Dounin
October 16, 2014 02:24PM
Hello!

On Thu, Oct 16, 2014 at 08:26:55PM +0400, Filipp Gunbin wrote:

> Hi, today I've noticed a strange thing regarding "internal" and
> "error_page" directives.
>
> I have a config similar to this:
>
> location ~ <regex> {
> internal;
> proxy_pass <srv>;
> error_page 404 = /other_location$uri;
> }
>
> What I'm surprised about is that if an external request comes to this
> location, we go the /other_location. So the 404 that results from
> "internal" is also subject for error_page processing. Isn't that
> strange? I cannot find any documentation about that.

If a location with "internal" keyword is selected for an external
request, the 404 error is generated. The error is handled as
usual, and it's subject to error_page processing if one is
configured.

The documentation is here:

http://nginx.org/en/docs/http/ngx_http_core_module.html#internal

--
Maxim Dounin
http://nginx.org/

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

internal and error_page directives

Filipp Gunbin October 16, 2014 12:28PM

Re: internal and error_page directives

Maxim Dounin October 16, 2014 02:24PM

Re: internal and error_page directives

Filipp Gunbin October 16, 2014 02:30PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 237
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready