rstudio / shiny-server

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

Order of location blocks matters #569

Open tfarkas86 opened 1 month ago

tfarkas86 commented 1 month ago

I have a Shiny Server deployment where I want a single app to be served at the base url, and a directory to served at another location. I discovered that the directory app will fail unless their location block is above the base url location. Is this noted in the documentation somewhere? Is there a more canonical approach?

This fails to load apps in more_apps:

{ server { listen 3838; location / { app_dir /srv/shiny-server/main-app/; log_dir /var/log/shiny-server; } location /more-apps { site_dir /srv/shiny-server/more-apps/; log_dir /var/log/shiny-server; directory_index on; } }

Whereas this succeeds:

{ server { listen 3838; location /more-apps { site_dir /srv/shiny-server/more-apps/; log_dir /var/log/shiny-server; directory_index on; } location / { app_dir /srv/shiny-server/main-app/; log_dir /var/log/shiny-server; } }