Hi all! I am attempting to host a Shiny app via an Amazon EC2 instance using Shiny Server. I am following this guide. I should note that this has worked for me in the past.
However, I am now getting an error where I am unable to load the app after following the instructions. I have followed all the instructions to the best of my ability.
I have installed the Shiny Server, and have confirmed that it is running.
The log folder for the shiny-server is empty, which leads me to believe its never being spun up/initialized in the first place when I try to open it.
Anyone have any insight into what's happening here? I am very inexperienced with server hosting and the like, so any hints would be greatly appreciated. Thanks in advance!
For posterity, I have solved this issue. First I restarted the shiny-server:
systemctl restart shiny-server
Then I updated the conf file as such:
# Instruct Shiny Server to run applications as the user "shiny"
run_as ubuntu;
# Define a server that listens on port 3838
server {
listen 3838;
location /users {
run_as :HOME_USER:;
user_dirs;
}
# Define a location at the base URL
location /allappfolders {
run_as shiny;
# Host the directory of Shiny Apps stored in this directory
site_dir /opt/shiny-server/allappfolders;
# Log all Shiny output to files in this directory
log_dir /var/log/shiny-server/allappfolders;
# 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;
};
# Define a location at the base URL
location /app1 {
# Host the directory of Shiny Apps stored in this directory
app_dir /opt/shiny-server/allappfolders/app1;
# Log all Shiny output to files in this directory
log_dir /var/log/shiny-server/app1;
# 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 off;
};
# Define a location at the base URL
location /app2 {
# Host the directory of Shiny Apps stored in this directory
app_dir /opt/shiny-server/allappfolders/app2;
# Log all Shiny output to files in this directory
log_dir /var/log/shiny-server/app2;
# 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 off;
};
}
This also involved moving my app files to /opt/ directory.
To be quite honest, I'm not sure what was the fix..... but it worked.