run_as shiny;
#access_log /var/shiny-server/access_log tiny;

server {
  listen 80;
  #server_name localhost;

  location /users {
    user_apps on;
  }

  location / {
    #runas nobody;
    #app_dir /var/shiny-server/www;
    redirect http://www.rstudio.com/;
  }

  location /08_html {
    app_dir /home/jcheng/ShinyApps/08_html;
    run_as jcheng;
    log_dir /home/jcheng/ShinyApps/08_html/log;
  }
}

server {
  listen 81;

  location / {
    user_apps on;
  }

  location / {
    app_dir /home/jcheng/ShinyApps/08_html;
    run_as jcheng;
    log_dir /home/jcheng/ShinyApps/08_html/log;
  }
}

server {
  listen 82;
  location /site {
    site_dir /Users/jcheng/ShinyApps;
    run_as jcheng;
    log_dir /Users/jcheng/ShinyApps/log;
  }
}
