Bokeh server + reverse-proxying with Nginx gives 404

让人想犯罪 __ 提交于 2019-12-01 00:20:30

I figured it out, apparently you need to add --prefix= with same location to the Bokeh command:

bokeh serve bokehserver.py --port 5100 --prefix=/plot/ --host website.com:80

And the location block in p-website.conf will look like:

location /plot/ {
    proxy_pass http://127.0.0.1:5100;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_http_version 1.1;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $host:$server_port;
    proxy_buffering off;
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!