I am deploying a new, updated Shiny Server under RHEL 8 to replace our old one running under CentOS 7.
Old server is running shiny-server-1.5.14.948-1.x86_64
New server is running shiny-server-1.5.21.1012-1.x86_64
My shiny-server.conf file is identical between the two servers and we are using user_dirs.
On the old server, if I browse to http://servername:3838/username it automatically redirects to http://servername:3838/username/ meaning it adds the trailing slash and the list of apps in the users' ~/ShinyApps folder displays just fine.
On the new server, if I browse to http://servername:3838/username it does NOT automatically adds the trailing slash and instead it just throws a "Page not found" error. If I manually add the trailing slash http://servername:3838/username/ the page displays just fine.
Is there a way to fix this and have it redirect if the trailing slash is omitted? Here is my shiny-server.conf file:
Instruct Shiny Server to run applications as the user "shiny"
run_as shiny;
Instruct Shiny Server to run applications as the user who owns
the home directory in which the application is stored
run_as :HOME_USER:;
preserve_logs true;
Define a server that listens on port 3838
server {
listen 3838 xxx.xxx.xxx.xxx;
Define a location at the base URL
location / {
# Host the directory of Shiny Apps stored in this directory
# site_dir /srv/shiny-server;
# Host the directory of Shiny Apps stored in the ~/ShinyApps directory
user_dirs;
# Log all Shiny output to files in this directory
# log_dir /var/log/shiny-server;
log_file_mode 0644;
# 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;
}
}