diff --git a/roles/jupyter/templates/jupyter-nginx.conf b/roles/jupyter/templates/jupyter-nginx.conf new file mode 100644 index 000000000..a9d450c10 --- /dev/null +++ b/roles/jupyter/templates/jupyter-nginx.conf @@ -0,0 +1,20 @@ +location /jupyterhub { + proxy_pass http://127.0.0.1:8000; + proxy_set_header X-Real-IP $remote_addr; + #proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-NginX-Proxy true; + + + # websocket headers + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + #proxy_set_header Connection $connection_upgrade; + proxy_set_header X-Scheme $scheme; + + proxy_buffering off; + } + # Managing requests to verify letsencrypt host + location ~ /.well-known { + allow all; + } diff --git a/roles/jupyter/templates/jupyterhub_config.py b/roles/jupyter/templates/jupyterhub_config.py index cd0999ca1..ade964254 100644 --- a/roles/jupyter/templates/jupyterhub_config.py +++ b/roles/jupyter/templates/jupyterhub_config.py @@ -124,7 +124,7 @@ c.JupyterHub.authenticator_class = 'firstuseauthenticator.FirstUseAuthenticator' # .. deprecated: 0.9 # Use JupyterHub.bind_url # Default: '/' -# c.JupyterHub.base_url = '/' +# c.JupyterHub.base_url = '/jupyterhub' ## The public facing URL of the whole JupyterHub application. #