File: multi-server.config

package info (click to toggle)
node-shiny-server 1.5.20.1002-4
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,740 kB
  • sloc: javascript: 7,112; sh: 933; cpp: 303; python: 155; makefile: 34
file content (46 lines) | stat: -rw-r--r-- 1,283 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46

# Instruct Shiny Server to run applications as the user ':HOME_USER:', where
# possible (this username only takes effect in locations managed by 
# 'user_dirs'). In all other locations, we should fall back to the 'shiny' user.
run_as :HOME_USER: shiny;

# Define a server that listens of port 3838.
server {
  listen 3838;

  # Define a location at the URL "/users"
  location /users {
    
    # Allow users to host their own apps in ~/ShinyApps
    user_dirs;

    # Optionally, you can restrict the privilege of hosting Shiny applications
    # only to members of a particular Linux group.
    # members_of shinyUsers;
  }

  # Define the location at the URL "/example1"
  location /example1 {
    app_dir /srv/shiny-server/sample-apps/hello;
    log_dir /var/log/shiny-server;
  }
}

# Define a server that listens on port 4949
server {
  listen 4949;

  # Define a location at the base URL
  location / {

    # Host the directory of Shiny Apps stored in this directory
    site_dir /srv/shiny-server;

    # Log all Shiny output to files in this directory
    log_dir /var/log/shiny-server;

    # When a user visits the base URL rather than a particular application,
    # an index of the applications available in this directory will be shown.
    directory_index on;
  }
}