Is there some option in Nginx that I could use to debug which way a request goes through certain location blocks? I don't want to turn on full debug log for the whole server just have some printf() inside a nested location block.It's only used to figure out how to configure Nginx as I'm new to it so no need for performance in production use.I already tried setting different headers but apparently adding headers only works if no headers have been added in a more specific location.
Nginx equivalent of printf() to debug complicated configurations
nginx
I've just learned about the echo module (https://www.nginx.com/resources/wiki/modules/echo/) which is almost exactly what I wanted.