title: nginx proxy_pass to all pages
body: <p>So I am using nginx to reverse proxy to another server. This wasn't serving static files, until I linked them in the location. The location block is super long, but looks similar to the code below. I'm sure that I'm doing this the wrong way, but it works, it's just tedious to write all the paths. I'm wondering if there's a better way.</p>
  
  <pre><code>location / {
      proxy_pass    www.example.com;
  }
  location /sytlesheet.css {
      proxy_pass    www.example.com/stylesheet.css;
  }
  location /page1 {
      proxy_pass    www.example.com/page1;
  }
  #this goes on and on
  </code></pre>
  
  <p>Is there a way to get everything past the '/' for example 'page1', and pass that to the proxy without manually typing it?</p>
  
  <p>I'm hoping there's something a way to use a variable or something to link all the pages and resources with a single location block:</p>
  
  <pre><code>location / {
      proxy_pass    www.example.com;
  }
  location /$variable {
      proxy_pass    www.example.com/$variable;
  }
  </code></pre>
  
  <p>Thanks!</p>