shiny server not serving apps from subdirectories 'Not Found'

Hello,

I have compiled and installed latest shiny server from git. It serves test app successfully from /srv/shiny-server/app.R requested as http://localhost:3838

However if I place the same app inside /srv/shiny-server/h1/ the browser returns Not Found when I ask for http://localhost:3838/h1/ and same error occurs if I place the test app (geyser histogram example) in a subdirectory of some other name such as hello and modify request accordingly.

I have checked permissions - they are all as shiny for the whole /srv/shiny-server/ subtree.
The trace log is as follows

[2020-06-18T10:04:33.007] [TRACE] shiny-server - Spawning new instance
[2020-06-18T10:04:33.007] [TRACE] shiny-server - Worker #f3be2ef831af46db acquiring http port. 1 HTTP, 0 WebSocket, 0 pending.
[2020-06-18T10:04:33.007] [TRACE] shiny-server - Launching /srv/shiny-server as shiny with on port 34947
[2020-06-18T10:04:33.008] [TRACE] shiny-server - Starting R
[2020-06-18T10:04:33.008] [TRACE] shiny-server - Attempting to connect to port 34947
[2020-06-18T10:04:33.008] [TRACE] shiny-server - Failed to connect to port 34947
[2020-06-18T10:04:33.058] [TRACE] shiny-server - Attempting to connect to port 34947
[2020-06-18T10:04:33.059] [TRACE] shiny-server - Failed to connect to port 34947
[2020-06-18T10:04:33.109] [TRACE] shiny-server - Attempting to connect to port 34947
[2020-06-18T10:04:33.110] [TRACE] shiny-server - Failed to connect to port 34947
[2020-06-18T10:04:33.210] [TRACE] shiny-server - Attempting to connect to port 34947
[2020-06-18T10:04:33.211] [TRACE] shiny-server - Failed to connect to port 34947
[2020-06-18T10:04:33.310] [TRACE] shiny-server - Attempting to connect to port 34947
[2020-06-18T10:04:33.310] [TRACE] shiny-server - Failed to connect to port 34947
[2020-06-18T10:04:33.395] [TRACE] shiny-server - Using R version: 4.0.1
[2020-06-18T10:04:33.395] [TRACE] shiny-server - Using shiny version: 1.4.0.2
[2020-06-18T10:04:33.409] [TRACE] shiny-server - R process spawned with PID 197565
[2020-06-18T10:04:33.409] [TRACE] shiny-server - Closing backchannel
[2020-06-18T10:04:33.410] [TRACE] shiny-server - Attempting to connect to port 34947
[2020-06-18T10:04:33.411] [TRACE] shiny-server - Failed to connect to port 34947
[2020-06-18T10:04:33.511] [TRACE] shiny-server - Attempting to connect to port 34947
[2020-06-18T10:04:33.511] [TRACE] shiny-server - Successfully connected to port 34947 after 500ms
[2020-06-18T10:04:33.511] [TRACE] shiny-server - Proxying request: /h1
[2020-06-18T10:04:33.511] [TRACE] shiny-server - http_proxy event: start
[2020-06-18T10:04:33.512] [TRACE] shiny-server - http_proxy event: proxyReq
[2020-06-18T10:04:33.591] [TRACE] shiny-server - http_proxy event: proxyRes
[2020-06-18T10:04:33.592] [TRACE] shiny-server - http_proxy event: end
[2020-06-18T10:04:33.592] [TRACE] shiny-server - Worker #f3be2ef831af46db releasing http port. 0 HTTP, 0 WebSocket, 0 pending.
[2020-06-18T10:04:33.592] [TRACE] shiny-server - No clients connected to worker #f3be2ef831af46db. Starting timer
[2020-06-18T10:04:38.597] [TRACE] shiny-server - Timeout expired. Killing process.
[2020-06-18T10:04:38.597] [TRACE] shiny-server - Interrupting process on socket port 34947
[2020-06-18T10:04:38.597] [TRACE] shiny-server - Sending SIGINT to 197565
[2020-06-18T10:04:39.615] [TRACE] shiny-server - Port 34947 returned
[2020-06-18T10:04:39.616] [TRACE] shiny-server - Port 34947 proxy closed
[2020-06-18T10:04:39.616] [TRACE] shiny-server - Normal exit, deleting log file /var/log/shiny-server/shiny-server-shiny-20200618-100433-34947.log

My server config file is the default one:

# Instruct Shiny Server to run applications as the user "shiny"
run_as shiny;

# Define a server that listens on port 3838
server {
  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 output to files in this directory
    log_dir /var/log/shiny-server;

    # When a user visits the base URL rather than a particular application,
    # an index of the applications available in this directory will be shown.
    directory_index on;
  }
}

Help to understand this would be much appreciated. Thanks

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.