rstudio / shiny-server

Host Shiny applications over the web.
https://rstudio.com/shiny/server
Other
715 stars 289 forks source link

How to restrict access to specific ip address #258

Open kush99993s opened 7 years ago

kush99993s commented 7 years ago

I have following code using shiny-server. I want to restrict access of App3 to one specific ip address.

server {
  # Instruct this server to listen on port 3838
  listen 80;

  # Define the location available at the base URL
  location / {
    #### PRO ONLY ####
    # Only up tp 20 connections per Shiny process and at most 3 Shiny processes
    # per application. Proactively spawn a new process when our processes reach
    #90% capacity.
    utilization_scheduler 20 .9 3;
    #### END PRO ONLY ####
   required_group Group1, Group2, Group3;

    # Run this location in 'site_dir' mode, which hosts the entire directory
    # tree at '/srv/shiny-server'
    site_dir /srv/shiny-server;

    # Define where we should put the log files for this location
    log_dir /var/log/shiny-server;

    # Should we list the contents of a (non-Shiny-App) directory when the user
    # visits the corresponding URL?
    directory_index on;

    location /Apps1 {

      required_group Group1, Group2, Group3;

    }
    location /Apps2 {

      required_group Group1, Group2, Group4;

    }

    location /Apps3 {

      required_group Group1, Group2, Group4;

    }

  }
}

How should I do that ?

jcheng5 commented 7 years ago

Sorry, this isn't a feature we currently offer. You might consider using Nginx as a frontend if you must do this.

https://support.rstudio.com/hc/en-us/articles/213733868-Running-Shiny-Server-with-a-Proxy