Reverse-proxying: Flask app with Bokeh server on Nginx
Reinis Rozitis
r at roze.lv
Fri May 12 15:26:39 UTC 2017
> 3. in the Flask app, I changed the URL
> to:url='https://138.197.132.46:5006/bokeh/'
> Now, when I open the app in the browser I get a 502 Bad Gateway, and the
> Flask log file says the following:
> raise IOError("Cannot pull session document because we failed to connect
> to the server (to start the server, try the 'bokeh serve' command)")
Well seems that the Flask app uses the url also for background requests.
You can't mix 'https://' and :5006 port in same url - this way the request
goes to port 5006 but it expects to be also encrypted but if I understand
correctly bokeh doesn't support SSL.
p.s. for best performance you could tweak that the Flask->bokeh requests go
through http but for the html template/output sent to clients there is
another variable or relative paths.
rr
More information about the nginx
mailing list