Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order of location blocks matters #569

Open
tfarkas86 opened this issue Jun 6, 2024 · 0 comments
Open

Order of location blocks matters #569

tfarkas86 opened this issue Jun 6, 2024 · 0 comments

Comments

@tfarkas86
Copy link

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;
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant