proxy_pass check if 404, and return 404

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


I am using proxy_pass to a dynamic subdomain:

    proxy_pass https://$remote_user.mydomain.io

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

    return 404;

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

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,246112,246112#msg-246112



More information about the nginx mailing list