I deployed ajupyter notebookon the intranet machineAusingdocker, and itsipis10.11. 11.10, the service port number is8888, and machineBcan access its80 through the department’s second-level domain name (such aschild.testgroup.org)Contents of the port.
Now I am doing a reverse proxy onnginxofBmachine, and I hope to accessjupyter notebook throughchild.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 ofurlalways occurs, as shown below:
##jupyter notebookwill jump to the directory/tree,gitlab-cewill jump to/sign_in, originally Hopeurlischild.testgroup.org/notebook/treeandchild.testgroup.org/notebook/sign_in, but when jumping, include the subsequentajaxrequests will not automatically add the/notebook/paragraph, and becomechild.testgroup.org/treeandchild.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