title: nginx won't change root to sub directory
body: <p>I'm new to nginx and I'm trying to get my second.domain.com to display the contents of first.domain.com/dir, ( running on port 3000 of my localhost ) after looking online it seems this is the solution</p>
  
  <pre><code># this one works fine
  server {
      listen 80;
  
      server_name first.domain.com;
  
      location / {
           proxy_pass http://localhost:3000;
           proxy_http_version 1.1;
           proxy_set_header Upgrade $http_upgrade;
           proxy_set_header Connection 'upgrade';
           proxy_set_header Host $host;
           proxy_cache_bypass $http_upgrade;
      }
   }
  
  # this one doesn't work as expected
  server {
      listen 80;
  
      server_name second.domain.com;
  
      location / {
           proxy_pass http://localhost:3000;
           proxy_http_version 1.1;
           proxy_set_header Upgrade $http_upgrade;
           proxy_set_header Connection 'upgrade';
           proxy_set_header Host $host;
           proxy_cache_bypass $http_upgrade;
           root /dir;
           index index.html;
      }
   }
  </code></pre>
  
  <p>but when I visit second.domain.com I'm getting the same root as first.domain.com rather than first.domain.com/dir  ...can anyone see what I'm doing wrong?</p>