Sorry to jump in here, but I was led to believe that the order of blocks in the configuration file didn't matter. If it does matter, then this wiki article needs updating: <a href="http://wiki.nginx.org/HttpCoreModule#location">http://wiki.nginx.org/HttpCoreModule#location</a><br>

<br>"Note that you could define these 4 configurations in any order and the results would remain the same.
"<br><br><div class="gmail_quote">On Wed, May 9, 2012 at 2:54 PM, Edho Arief <span dir="ltr"><<a href="mailto:edho@myconan.net" target="_blank">edho@myconan.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<br>
Make sure to put it before "location /" block.<br clear="all"></blockquote></div><br>-- <br>Adrian Hayter<br><br>