gdoney1701 / COAWST-Test

3 stars 2 forks source link

Get Chris Calloway's notebook running on gamone #9

Open rsignell-usgs opened 7 years ago

rsignell-usgs commented 7 years ago

Try to get Chris Calloway's existing surge notebook running on Gamone

rsignell-usgs commented 7 years ago

@cbcunc, I finally got this working. The problem was due to nginx and my reverse proxy stuff. Thanks to this post on nginx and jupyter, I was able to get this going at https://gamone.whoi.edu/jupyter. Here's proof!

2017-07-14_23-00-28

rsignell-usgs commented 7 years ago

Here's what I needed to do:

In /home/rsignell/.jupyter/jupyter_notebook_config.py:

c.NotebookApp.base_url = '/jupyter'
c.NotebookApp.ip = '*'
c.NotebookApp.notebook_dir = '/home/rsignell/github'
c.NotebookApp.open_browser = False
c.NotebookApp.password = u'sha1:xxxxxxxxxxxxxxxxxxxxxxx'
c.NotebookApp.port = 8877
c.NotebookApp.port_retries = 50

In /opt/docker/nginx/conf.d/rsignell.conf:

# jupyter dashboard

  location /jupyter/ {
    proxy_pass http://gamone:8877/jupyter/;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header Host $http_host;
    proxy_http_version 1.1;
    proxy_redirect off;
    proxy_buffering off;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_read_timeout 86400;
  }
rsignell-usgs commented 7 years ago

I should check out this nginx/jupyter config also https://gist.github.com/cboettig/8643341bd3c93b62b5c2