PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, June 24, 2022

[FIXED] How to run jupyter notebook behind haproxy and make its content public?

 June 24, 2022     haproxy, jupyter-notebook, load-balancing, reverse-proxy     No comments   

Issue

How to run jupyter notebook behind haproxy? I tried to find an answer on the Internet but there are solutions only for Ngix and Apache and I think that using haproxy as a reverse proxy can be even a simple solution that does not involve creating special Virtual servers.


Solution

The following solution run successfully and also does load balancing.

Assuming that you have a site jupyter.example.com the following code inserted in the /etc/haproxy/haproxy.cfg will solve your problem of making the jupyter notebook public:

backend jupyter
        option forwardfor
        http-request set-header X-Client-IP %[src]
        reqrep ^([^\ :]*)\ /mez/(.*) \1\ /\2
        reqadd X-Script-Name:\ /jupyter
        option http-server-close
        server Server12 10.0.0.12:8888 weight 40 check
        server Server14 10.0.0.14:8888 weight 20 check


Answered By - Bogdan
Answer Checked By - Clifford M. (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing