nginx reverse proxy for rshiny

I have about 6 shiny apps that some colleagues wanted me to host but I am having trouble correctly configuring nginx.

What I want to happen is myapp1.mydomain to serve the app from /srv/shiny-server/myapp1
and myapp2.mydomain to serve the app /srv/shiny-server/myapp2.

What is happening is that every subdomain request just gets sent to the default shiny app.

Each app has a sites-available config that I adapted from my experience hosting django apps behind nginx.

server {
client_max_body_size 20M;
listen 443 ssl http2;
server_name myapp1.mydomain;

    location / {
    proxy_read_timeout 800;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto https;
    proxy_set_header Host $http_host;
    proxy_redirect off;

    if (!-f $request_filename){
    proxy_pass http://localhost:3838;
    break;
    }
}

}

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.