Bokeh Serve HTTPS instead of HTTP

前端 未结 1 1133
梦谈多话
梦谈多话 2021-01-22 02:28

How to use HTTPS instead of HTTP for Bokeh Serve ?

The command I use is: bokeh serve --port 8000

I\'m using an Amazon EC2 with a docker container (

相关标签:
1条回答
  • 2021-01-22 03:04

    EDIT: The old answer is obsolete. As of Bokeh 1.4, you can terminate SSL directly on the Bokeh server (no Nginx required):

    https://docs.bokeh.org/en/latest/docs/user_guide/server.html#ssl-termination



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

    Include in your nginx.conf :

    # redirect HTTP traffic to HTTPS (optional)
    server {
        listen      80;
        server_name foo.com;
        return      301 https://$server_name$request_uri;
    }
    

    and run the serve command with --use-x-headers flag

    bokeh serve myapp.py --port 8000 --use-xheaders
    

    This tutorial might be helpful: https://blog.docker.com/2015/04/tips-for-deploying-nginx-official-image-with-docker/

    0 讨论(0)
提交回复
热议问题