I want nginx to return a 404 code when it receives a request which matches a pattern, e.g., /test/*. How can I configure nginx to do that?
/test/*
location ^~ /test/ { internal; }