Nginx: Proxy intercept errors catching every status code

Viewed 828

I have an nginx configuration for a specific subdomain that intercepts errors so it can redirect a custom status code

        proxy_intercept_errors on;
        error_page 399 =200 @customfallback;

The 399 is being redirected correctly, but the proxy_intercept_errors directive is catching also 404 errors and instead of serving our error page it's serving a broken page since the directive is not configured

I've checked the nginx documentation and it says that it should only intercept configured status code, but that isn't happening here.

How can I configure nginx so that the 404 isn't caught and the server response is delivered?

0 Answers
Related