internal and error_page directives

Filipp Gunbin fgunbin at fastmail.fm
Thu Oct 16 16:26:55 UTC 2014


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.

-- 
    Filipp



More information about the nginx mailing list