proxy_pass check if 404, and return 404

justink101 nginx-forum at
Tue Jan 7 23:02:38 UTC 2014

I am using proxy_pass to a dynamic subdomain:

    proxy_pass https://$

Is it possible to have the proxy_pass check if the response of
https://$ is 404, if so, simply do:

    return 404;

I.E. don't proxy, immediately return.

Posted at Nginx Forum:,246112,246112#msg-246112

More information about the nginx mailing list