adds the Jupyter config files and description

This commit is contained in:
Nicolas Wavrant 2016-03-22 19:23:45 +01:00
parent 8b975a0502
commit 4e33295c7c
3 changed files with 49 additions and 0 deletions

View File

@ -14,3 +14,4 @@ I upload it here first to easily find whenever I will need them again, but also
* __apache_webdav_cors.conf__ and __nginx_webdav_cors.conf__ : config files for apache and nginx respectively, which allow to use CORS on webdav shares. They could be improved by using a variable saving the referer name, to allow CORS on every domain, and not only one specific hardcoded one.
* __etc_network_interfaces__ and __wpa_supplicant.conf__ : allow a device to connect to a WEP Wifi network on boot. Used for my raspberry pi. The config to connect to a WPA network is easy to find, but it isn't for a WEP network.
* __Jupyter Notebook__ : runs a Jupyter Notebook (http://jupyter.readthedocs.org/en/latest/index.html) instance behind an apache reverse proxy. Thanks to the proxy, the notebook is not directly accessible from the outside, and is protected by SSL + Basic Auth. Up to you to add new Jupyter kernels and develop in any language from any device.

View File

@ -0,0 +1,37 @@
<VirtualHost *:443>
ServerName _
SSLEngine on
SSLProtocol ALL -SSLv2 -SSLv3
SSLCertificateFile /etc/apache2/ssl/jupyter.pem
SSLCertificateKeyFile /etc/apache2/ssl/jupyter.key
#ProxyPass "/(.*)" "http://localhost:8888/$1"
#ProxyPassReverse "/(.*)" "https://_/$1"
<Location "/">
ProxyPass "http://localhost:8888/"
ProxyPassReverse "https://_/"
#Header set Origin "http://localhost:8888"
RequestHeader set Origin "http://localhost:8888"
AuthType Basic
AuthName "Authentication Required"
Require valid-user
AuthUserFile "/etc/apache2/htpasswd"
</Location>
<Location /api/kernels/>
ProxyPass ws://localhost:8888/api/kernels/
ProxyPassReverse ws://localhost:8888/api/kernels/
AuthType Basic
AuthName "Authentication Required"
Require valid-user
AuthUserFile "/etc/apache2/htpasswd"
</Location>
CustomLog /var/log/apache2/jupyter-access.log combined
ErrorLog /var/log/apache2/jupyter-error.log
</VirtualHost>

View File

@ -0,0 +1,11 @@
[program:jupyter]
command=/usr/local/bin/jupyter notebook --config /home/jupyter/.jupyter/jupyter_notebook_config.py
environment=HOME="/home/jupyter"
directory=/home/jupyter/notebooks
autostart=true
autorestart=true
startsecs=3
user=jupyter
stdout_logfile=/home/jupyter/.jupyter/jupyter.log
stderr_logfile=/home/jupyter/.jupyter/jupyter-error.log
directory=/home/jupyter/notebooks