Hi, I am trying to run a Bokeh app using nginx to serve it, however nginx only show the default Nginx welcome page when I go to the address of the server. I am running a CentOS 8 VM on Azure and got a private ip address 10.73.162.4. Using ssh
to work on the VM. I can go directly to the Bokeh app in the browser on the local machine without any issues, but not by proxy.
I have created a Nginx conf
file in /etc/nginx/conf.d/bokeh.conf
:
upstream bokeh_site {
server 127.0.0.1:5100;
}
server {
listen 80;
listen [::]:80;
server_name _;
access_log /tmp/bokeh.access.log;
error_log /tmp/bokeh.error.log debug;
location / {
proxy_pass http://bokeh_site;
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_buffering off;
}
}
I have not touched the default Nginx conf file, but have confimred that there is an include
to pickup local conf files. I have restarted nginx with sudo systemctl restart nginx
.
The bokeh app is just the standard sliders.py which I am running in a server directory fomat:
.
├── sliders
│ └── main.py
I start Bokeh with
bokeh serve sliders/ --allow-websocket-origin=10.73.162.4:5100 --port 5100
and I can view it in the browser with 10.73.162.4:5100/sliders
.
But I thought that with Nginx setup I could just use 10.73.162.4
in order to serve the Bokeh app, however this just shows the default Nginx welcome page.
Any help appreciated.