Welcome! Log In Create A New Profile

Advanced

Nginx proxy_pass for (R based) shiny apps

Posted by stah0121 
Nginx proxy_pass for (R based) shiny apps
November 14, 2022 09:17PM
Hi All,

I have a base understanding of nginx and I have an https domain setup and functioning correctly for jupyterhub (interactive python notebook server for multiple users) but I'm having trouble setting up location directives for shiny applications spawned by various notebook instances.

Within the server block for the primary domain I have an include directive for the file containing location blocks where I'd like to proxy_pass specific domain locations to specific http localhost ports where various shiny applications are listening.

The problem I'm having is that the resource files returned by the shiny application are using a different URL than the proxy_pass is setup for and I'm not sure what sort of location regex I need to make it work (attached file shows chrome errors from the inspection tool).

For example the shiny app(s) is setup for proxy_pass like so (location is same as the localhost port):
location /<loc> { proxy_pass http://localhost:<loc>/ }

but the resource files have the URL:
https://<domain>:/hub/shiny-css-<version>/shiny.min.js

If I'm thinking about things correctly I THINK I need to add some kind of special location block for the /hub/ location stuff but I'm not sure how to do it.
I also attached an image of one of the location block configs I'm using.

Any help is appreciated.
Thanks!
Attachments:
open | download - nginx_proxy_pic.png (105 KB)
open | download - nginx_proxy_config.png (38.9 KB)
Re: Nginx proxy_pass for (R based) shiny apps
September 11, 2023 11:34AM
Did you find a solution?
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 324
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready