lvalnegri

shiny_server.config

Apr 21st, 2019
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 1.60 KB | None | 0 0
  1. ## R Shiny Server config file for Cloud Analytics Machine as explained in <WeR> Meetup Workhops (work in progress...)
  2. ## Meetup: https://www.meetup.com/WeR-stats/
  3. ## Github: https://github.com/WeR-stats/workshops/tree/master/setup_cloud_machine_data_science#install-shiny-server
  4.  
  5. # this file is located in `/etc/shiny-server/shiny-server.conf`
  6.  
  7. # after making changes to this file, restart the shiny-server service: `sudo service shiny-server restart`
  8.  
  9. # instruct Shiny Server to run applications as the user "shiny"
  10. run_as shiny;
  11.  
  12. # save users actions by time and ip
  13. access_log /usr/local/share/public/shiny_server/logs/access.log combined;
  14.  
  15. # if true, instruct the server to not delete the logs, but remember to rotate or any other cleaning action
  16. preserve_logs true;
  17.  
  18. # if false, informative error messages are printed out
  19. sanitize_errors false
  20.  
  21. # define a server (you could define as many as you want)
  22. server {
  23.  
  24.   # set the port the server listens to (default: 3838)
  25.   listen 3838;
  26.  
  27.   # Define a location at the base URL
  28.   location / {
  29.  
  30.     # host the directory of Shiny Apps stored in this directory
  31.     site_dir /srv/shiny-server;
  32.  
  33.     # log all Shiny outputs to files in the *public* shared folder
  34.     log_dir /usr/local/share/public/shiny_server/logs;
  35.  
  36.     # change permission on log dir (if using the "public" folder 0640 is OK)
  37.     log_file_mode 0640;
  38.  
  39.     # maximum number of simultaneous connections
  40.     simple_scheduler 15;
  41.  
  42.     # do not show the index of the applications available (if a user visits the base URL rather than a particular application)
  43.     directory_index off;
  44.  
  45.   }
  46.  
  47. }
Add Comment
Please, Sign In to add comment