NGINX ShinyProxy Demo - Does it work?

Hi, I have set up ShinyProxy on EC2 with and have it working in a Docker container. When I add 8080 to the URL the app - 01_hello works fine. If I leave out the 8080, I go to the login screen (fine), log in with Tesla and password (fine) , click on the link and the app loads - half way and grays out (missing the tabs and graph).

I had thought that it was a Docker image issue, but it works fine if I bypass NGINX, so this is definitely a NGINX, to ShinyProxy issue.

Anyone have any clues?

Thanks in advance.

P.S. no errors in any log files…

Hi @ShinyBucket

Did you start from this configuration?

Greying out may have to do with websocket configuration being absent.



I manged to get shinyproxy working with Nginx in docker, but I still get the grey screen after exactly two minutes even though I set the proxy_*_timeout to 15 minutes. When I look at the network activity in chrome (F12) is shows that the websocket is pending for the two minutes until it grays out.

Any help will be much appreciated. I have both Nginx and Shinyproxy running in docker containers. I have the following Nginx config, where

shinyproxy is the docker host the shinyproxy container

worker_processes 4;

events { worker_connections 1024; }

http {
client_max_body_size 0;
sendfile on;

server_tokens       off;
keepalive_timeout   900s;

add_header          Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
add_header          X-Content-Type-Options nosniff;
add_header          X-Frame-Options SAMEORIGIN;
add_header          X-XSS-Protection "1; mode=block";

ssl_certificate /etc/nginx/cert.pem;
ssl_certificate_key /etc/nginx/private.key;

ssl_ciphers         EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH;
ssl_prefer_server_ciphers on;
ssl_protocols       TLSv1 TLSv1.1 TLSv1.2;
ssl_session_cache   shared:SSL:10m;
ssl_session_timeout 10m;
ssl_stapling on;
ssl_stapling_verify on;

upstream shinyproxy_servers {
    server shinyproxy:8080;

server {
    listen 80;
    listen [::]:80;

    return 301 https://$host$request_uri;

server {
    listen 443 ssl default_server;
    listen [::]:443 ssl default_server;

    access_log   /var/log/nginx/shinyproxy.access.log;
    error_log    /var/log/nginx/shinyproxy.error.log error;

    location / {
        proxy_pass http://shinyproxy_servers;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_connect_timeout 900s;
        proxy_send_timeout 900s;
        proxy_read_timeout 900s;

        proxy_redirect    off;
        proxy_set_header  Host             $http_host;
        proxy_set_header  X-Real-IP        $remote_addr;
        proxy_set_header  X-Forwarded-For  $proxy_add_x_forwarded_for;
        proxy_set_header  X-Forwarded-Protocol $scheme;


Hi @gbisschoff,

Here are some things to check:

  • In chrome’s network activity tab, do you see heartbeat calls going out every ~10sec?
  • In the shinyproxy.log file, do you see messages about proxies shutting down due to inactivity?

Hi @fmichielssen,

thanks for the response.

In the network activity I do see the heartbeat every 10sec with a status of 200.
In the nginx access.log I also see the heartbeat, followed by a 101 for the websocket after about 2min, but the heartbeat continues thereafter.
In the shinyproxy.log I see the proxy gets activated for the app and user that is logged in.
When the app grays out the shinyproxy.log does not show anything.

Some screen shots.





I did some research and found that a status code of 101 is valid and that pending shows the connection is active/open for two way communication.

Now I have no idea what is causing the timeout anymore.