[英]How to run jupyter notebook behind haproxy and make its content public?
如何在 haproxy 后面運行jupyter notebook
haproxy
我試圖在互聯網上找到答案,但只有Ngix
和Apache
的解決方案,我認為使用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.