http - nginx reverse proxy url error
世界只因有你
世界只因有你 2017-06-06 09:54:28
0
1
1110

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.

Please help me find out what to do, whether to modify the

nginxconfiguration or whether other elements are needed.

世界只因有你
世界只因有你

reply all (1)
巴扎黑

Add /notebook/ after proxy_pass, and if you want child.testgroup.org/notebook to be accessible, the location should be /notebook

location /notebook { proxy_pass http://10.11.11.10:8888/notebook/; proxy_redirect off; ... }
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!