run_as shiny;

server {
  listen 3838;

  location /a {
    # Top-level location; this is a real one
    site_dir /srv/shiny-server;
    log_dir /var/log/shiny-server;
    directory_index on;
    app_idle_timeout 30;

    location /b {
      # Second-level location takes precedence over top
      app_dir /b;
      app_idle_timeout 5;
    }

    location /c {
      # Second-level location takes precedence over top
      app_dir /c;
    }

    location /d {
      # Second-level location takes precedence over top
      directory_index false;
    }
  }
}
