Force "internal" directive to display a custom 404?

Maxim Dounin mdounin at mdounin.ru
Tue Aug 7 13:40:25 UTC 2012


Hello!

On Mon, Aug 06, 2012 at 05:31:50PM -0400, TECK wrote:

> Example:
> 
> error_page 404 /404.html;
> 
> location = /404.html {
>     internal;
> }
> 
> location /alpha {
>     internal;
> }
> 
> The proper behavior would be to display the custom 404.html in every
> case, which does not.
> I'm not sure this could be marked as new feature, or is feasible with
> some configuration I don't know about it?

Do you actually have 404.html file under document root?  The above 
config properly returns custom 404 for "/404.html", "/alpha", and 
"/alpha/foo" requests here, just tested.

Maxim Dounin



More information about the nginx mailing list