Reverse-proxying: Flask app with Bokeh server on Nginx

Reinis Rozitis r at
Fri May 12 10:33:16 UTC 2017

> I understand that I might have to use a method called reverse proxying, 
> which is described here. However, I wasn't able to get it to work.

Well you already do this "method called reverse proxying" with the Flask app 
so you have to do the same with the Bokeh app as all modern/current browsers 
require all resources on a HTTPS website to be also loaded through secure 

> Does anybody have an idea how to solve this? A similar problem was 
> described here.

You can basically copy the configuration from the SO thread you linked 
(obviously you can change the location names as you wish / they just need to 

In nginx add:

location /bokeh/ {

    # .. with the rest of directives

relaunch the Bokeh app with


and (if takes part in the url construction rather than application 
background requests) change the url variable in the Flask app


or even just relative url='/bokeh/' .. (I'm not familiar with this software 
stack so you have to test yourself)


More information about the nginx mailing list