I deployed ajupyter notebook
on the intranet machineA
usingdocker
, and itsip
is10.11. 11.10
, the service port number is8888
, and machineB
can access its80 through the department’s second-level domain name (such as
child.testgroup.org)
Contents of the port.
Now I am doing a reverse proxy onnginx
ofB
machine, and I hope to accessjupyter notebook through
child.testgroup.org/notebook. My configuration is as follows:
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"; }
But when accessing throughchild.testgroup.org/notebook
, an error ofurl
always occurs, as shown below:
##jupyter notebookwill jump to the directory
/tree,
gitlab-cewill jump to
/sign_in, originally Hope
urlis
child.testgroup.org/notebook/treeand
child.testgroup.org/notebook/sign_in, but when jumping, include the subsequent
ajaxrequests will not automatically add the
/notebook/paragraph, and become
child.testgroup.org/treeand
child.testgroup.org /sign_in.
nginxconfiguration or whether other elements are needed.
Add /notebook/ after proxy_pass, and if you want child.testgroup.org/notebook to be accessible, the location should be /notebook