-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathshiny-server.conf
48 lines (31 loc) · 1.5 KB
/
shiny-server.conf
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
47
48
## R Shiny Server configuration file ==> `/etc/shiny-server/shiny-server.conf`
## `/usr/local/share/public/` is the shared storage location on the server defined as PUB_PATH both in *R* and *Linux*
# instruct Shiny Server to run applications as the user "x"
run_as shiny;
# set keepalive connection time to "x" seconds
http_keepalive_timeout 600;
# save users actions by time and ip
access_log /usr/local/share/public/shiny_server/logs/access.log combined;
# if true, instruct the server to not delete the logs (but remember to rotate or any other cleaning action if heavy load)
preserve_logs true;
# if false, informative error messages are printed out; this should be: "true" in live, "false" in dev/test
sanitize_errors false;
# define a server that listens on port "x" (def at installation: 3838)
server {
listen 3838;
# define a location at the base URL
location / {
# host the directory of Shiny Apps stored in this directory as root
site_dir /srv/shiny-server;
# log all Shiny outputs to files in this directory (def:
log_dir /usr/local/share/public/shiny_server/logs;
# change permission on log dir (if using the "public" folder 0644 is OK)
log_file_mode 0644;
# maximum number of simultaneous connections
simple_scheduler 15;
# do not show the index of the applications available (if a user visits the base URL rather than a particular application)
directory_index off;
# set application idle time limit to x seconds
app_idle_timeout 600;
}
}