I am trying to configure a NGINX server so that a shiny server and shiny applications can be run via NGINX with proper password protection. My NGINX default file is shown in the example below:
server {
listen 80 default_server;
listen [::]:80 default_server;
root /srv/shiny-server/;
#index index.html;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;
server_name _;
location / {
proxy_bind 127.0.0.1;
proxy_pass http://localhost:8080/;
proxy_redirect http://localhost:8080/ $scheme://$host/;
auth_basic "Username and Password are required";
auth_basic_user_file /etc/nginx/.htpasswd;
try_files $uri $uri/ =404;
}
}
When I go to localhost:80 the shiny welcome page is displayed but the two apps "hello" and "rmd" does not run (See screenshot below).
Doesn anyone have a clue about what I am doing wrong here?
Help would be highly appreciated.
Kasper