nginx - reverse proxy mulitple ipython notebook servers -


currently running ipython notebook server behind nginx proxy. works straightforward 1-to-1 mapping.

now want run multipe notebook servers behind 1 proxy. since these servers dynamically added, proxying should dynamic well.

ideally i'd proxy on url subpath:

http://open.net/py1 -> http://secure1:8888 http://open.net/py2 -> http://secure2:8888 http://open.net/py3 -> http://secure3:8888 etc. 

problem approach ipython doesn't use relative url's inside it's html. extract:

<script src="/static/.../promise.min.js"</script> <script src="/static/.../require.js"</script> <script> ... 

so inside http://open.net/py2 require.js loaded via http://open.net/static/.../require.js of course result in 502. should http://open.net/py2/static/.../require.js

question: what's strategy solve this?

constraints:

  • i cannot touch source html
  • i cannot use subdomains each ipython server (as dynamically added)

what's strategy solve this?

subdomains

i cannot use subdomains each ipython server (as dynamically added)

not true.

# py<some-digits> subdomain. server {     listen 80;     server_name ~^(?<sub>py\d+)\.example\.com$;     # have $sub variable contains subdomain     # , used choose server want connect     ... }  # catch server block simple shows 404 request server {     listen 80 default_server;     return 404; } 

Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -