Contenu du A
上用docker
部署了一個(gè)jupyter notebook
,其ip
為10.11.11.10
,服務(wù)端口號(hào)為8888
,機(jī)器B
可以通過部門二級(jí)域名(如child.testgroup.org
)訪問其80
port de ma machine sur l'intranet.
Maintenant, je le suis, B
機(jī)的nginx
上做反向代理,希望通過child.testgroup.org/notebook
來訪問jupyter notebook
. Ma configuration est la suivante :
location /notebook/ {
proxy_pass http://10.11.11.10:8888/;
proxy_redirect off;
proxy_set_header HOST $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
Mais erreur child.testgroup.org/notebook
來訪問時(shí)總是出現(xiàn)url
réussie, comme indiqué ci-dessous?:
jupyter notebook
會(huì)跳轉(zhuǎn)到/tree
這個(gè)目錄下,gitlab-ce
會(huì)跳轉(zhuǎn)到/sign_in
,本來希望url
是child.testgroup.org/notebook/tree
及child.testgroup.org/notebook/sign_in
,但跳轉(zhuǎn)時(shí),包括后續(xù)的ajax
請(qǐng)求都不會(huì)自動(dòng)加上/notebook/
這一段,變成了child.testgroup.org/tree
及child.testgroup.org/sign_in
.
Veuillez m'aider à savoir quoi faire, s'il faut modifier la nginx
configuration ou si d'autres éléments sont nécessaires.
Ajoutez /notebook/ après proxy_pass, et si vous souhaitez que child.testgroup.org/notebook soit accessible, l'emplacement doit être /notebook
location /notebook {
proxy_pass http://10.11.11.10:8888/notebook/;
proxy_redirect off;
...
}