<p class="MsoNoSpacing">I have a 404 page defined as follows. If I purposefully
hit a non valid page I see the custom 404 page. But sometimes due to rate
limiting and probably busy CPU I see the default nginx 404 page. </p>
<p class="MsoNoSpacing">I can’t narrow this down to the precise reason, but I keep
seeing this every now and then. I don’t run a very powerful VM </p>
<p class="MsoNoSpacing">How do I show the custom 404 always? </p><p class="MsoNoSpacing"></p><p class="MsoNormal"> error_page 404 = @errorpages;</p>
<p class="MsoNormal"> location
@errorpages {</p>
<p class="MsoNormal"> root /var/www/prod/cucumbertown/templates/;</p>
<p class="MsoNormal"> internal;</p>
<p class="MsoNormal"> proxy_pass <a href="http://localhost:82">http://localhost:82</a>;</p>
<p class="MsoNormal"> proxy_set_header Host $host;</p>
<p class="MsoNormal"> proxy_set_header X-Real-IP $remote_addr;</p>
<p class="MsoNormal"> proxy_set_header Accept-Encoding
"";</p>
<p class="MsoNormal"> proxy_ignore_headers Set-Cookie; </p>
<p class="MsoNormal"> proxy_ignore_headers Cache-Control; </p>
<p class="MsoNormal"> proxy_ignore_headers Expires; </p>
<p class="MsoNormal"> proxy_ignore_headers X-Accel-Expires; </p>
<p class="MsoNormal"> add_header X-Cache-Status
$upstream_cache_status;</p>
<p class="MsoNormal"> proxy_cache jscss;</p>
<p class="MsoNormal"> proxy_cache_key $request_uri;</p>
<p class="MsoNormal">
proxy_cache_use_stale updating;</p>
<p class="MsoNormal"> }</p><p></p>
<p class="MsoNoSpacing">-Quintin</p>