Serving static files with nginx while using a reverse proxy

As you might have noticed, this blog is powered by Ghost. I use nginx as my reverse proxy to the nodejs server that Ghost runs on. However, before I started using Ghost as my main content publisher, I kept some static files around for my resume. Once I started serving as a reverse proxy, I needed to specify the /resume subdirectory in a separate place in the config section in order for it not to get caught by the reverse proxy.

  location ^~ /resume {
                alias   /path/to/website/resume;
        }

I initially tried using root in this section but it does not work the same way as it does in standard configurations. Only once I specifically used alias, did it start to work as expected.