title: Add context path for an app on nginx
body: <p>Nginx servers all the static content from the root directory to the root URL. For example if the root content location is configured as <code>/usr/share/nginx/html</code> which contains a file <code>/usr/share/nginx/html/foo.html</code>, then the url <code>http://localhost/foo.html</code> will serve that html file. I want to prefix a context path in the URL such that <code>http://localhost/myapp/foo.html</code> should serve <code>/usr/share/nginx/html/foo.html</code> file. </p>
  
  <p>I tried changing the location and adding an alias but that gives a 404.</p>
  
  <pre><code>  location / {
      root   /usr/share/nginx/html;
      index  index.html index.htm;
    }
  
    location /myapp/ {
      alias   /usr/share/nginx/html/;
    }
  </code></pre>
  
  <p>I also want that <code>http://localhost/myapp</code> should serve <code>/usr/share/nginx/html/index.html</code></p>
  
  <p>I'm using nginx's <code>1.12.1-alpine</code> docker image</p>