Reputation: 1651
As you can see below the shiny-server.conf file containing "run_as zza025;" in 2nd line. But the problem is all apps are running with this given user id. All the apps which we build are running with this id and all logs are creating with the same id. Is there any way, if different apps can use their own id rather than using same id?
Do I need to have separate shiny-server.conf for each application with their own application id?
shiny-server]$ more shiny-server.conf
# Instruct Shiny Server to run applications as the user "shiny"
run_as zza025;
# Define a server that listens on port 3838
server {
listen 3838;
# 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;
}
}
Any idea will be greatly appreciated.
Thanks!
Tinku
Upvotes: 0
Views: 1568
Reputation: 11
You can use run_as inside location block and each location block can be configured for an application.
location /users {
run_as :HOME_USER:;
user_dirs;
}
location /apps {
run_as shiny;
site_dir /srv/shiny-server;
log_dir /var/log/shiny-server;
directory_index on;
}
Use this link for more documentation: http://rstudio.github.io/shiny-server/latest/#home_user
Upvotes: 1