Oct 232011
Debug Nginx configuration using the echo module
Answer:
When you want to confirm you have configured Nginx correctly, e.g. make sure you have the right rewrite rules. The easiest way is to use the echo module to debug.
E.g.
..
location / {
rewrite ^/foo /bar break;
echo $uri; # try with other variables you want to trace
}
When you use curl to request the page, you should receive something like:
# curl http://example.com/foo
bar