title: nginx location outside document root
body: <p>I am new to nginx. Please help me to set up following configuration:
  The root folder for site.com is <code>/var/www(root /var/www)</code>.
  But when somebody opens <a href="http://site.com" rel="nofollow">http://site.com</a>, I want to load contents from <code>/var/www/home</code>.
  If somebody tries <a href="http://site.com/anything" rel="nofollow">http://site.com/anything</a>, I want to load contents from <code>/var/www/anything</code>.</p>
  
  <p>I tried following</p>
  
  <pre><code>root /var/www;
  location = / {
  root /var/www/home
  }
  </code></pre>
  
  <p>but it didn't work.</p>
  
  <p>Also, I tried</p>
  
  <pre><code>location = / {
  root /var/www/home
  }
  
  location / {
  root /var/www
  }
  </code></pre>
  
  <p>and again this didn't work,</p>
  
  <p>Please help</p>