簡體   English   中英

如何在 haproxy 后面運行 jupyter notebook 並公開其內容?

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

如何在 haproxy 后面運行jupyter notebook haproxy 我試圖在互聯網上找到答案,但只有NgixApache的解決方案,我認為使用haproxy作為反向代理甚至可以是一個不涉及創建特殊虛擬服務器的簡單解決方案。

以下解決方案成功運行並且還進行了負載平衡。

假設您有一個站點jupyter.example.com插入以下代碼 /etc/haproxy/haproxy.cfg 將解決您公開 jupyter notebook 的問題:

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM