0

I am trying to set up Nginx reverse proxy to a web app being served by Python bokeh server as instructed here:

https://bokeh.pydata.org/en/latest/docs/user_guide/server.html

For testing I am using a simple myapp.py from the same link. I use bokeh serve myapp.py --port 5100 to start the app.

My Nginx server is up and running. I have modified the Nginx setup to allow reverse proxy to port 5100 like so:

server {
listen 80 default_server;
server_name _;

access_log  /tmp/bokeh.access.log;
error_log   /tmp/bokeh.error.log debug;

location / {
    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;
}

}

However when I visit http://localhost, I get sent to localhost/myapp and a Page 404 error. The app is still running fine on localhost:5100/myapp.

What am I doing wrong? Any help or suggestion would be greatly appreciated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.