lvalnegri icon

shiny_server.config

lvalnegri | PRO | 04/21/19 01:03:52 PM UTC | 0 ⭐ | 428 👁️ | Never ⏰ | []
Nginx |

1.6 KB

|

None

|

0 👍

/

0 👎

## R Shiny Server config file for Cloud Analytics Machine as explained in <WeR> Meetup Workhops (work in progress...)
## Meetup: https://www.meetup.com/WeR-stats/
## Github: https://github.com/WeR-stats/workshops/tree/master/setup_cloud_machine_data_science#install-shiny-server
 
# this file is located in `/etc/shiny-server/shiny-server.conf`
 
# after making changes to this file, restart the shiny-server service: `sudo service shiny-server restart`
 
# instruct Shiny Server to run applications as the user "shiny"
run_as shiny;
 
# 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
preserve_logs true;
 
# if false, informative error messages are printed out
sanitize_errors false
 
# define a server (you could define as many as you want)
server {
 
  # set the port the server listens to (default: 3838)
  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 outputs to files in the *public* shared folder
    log_dir /usr/local/share/public/shiny_server/logs;
 
    # change permission on log dir (if using the "public" folder 0640 is OK)
    log_file_mode 0640;
 
    # 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;
 
  }
 
}

Comments