- Install jupyter in virtual environment
- Install jupyter
pip install jupyter
- Generate or modify
jupyter_notebook_config.py
jupyter notebook --generate-config
vim ~/.jupyter/jupyter_notebook_config.py
- maintain the following entries in config file
- c.NotebookApp.notebook_dir = ‘/home/myfolder/’
- c.NotebookApp.open_browser = False
- c.NotebookApp.port = 5000
- c.ServerApp.local_hostnames = [‘localhost’,’notebook.erprealm.com’]
- c.NotebookApp.allow_origin = ‘*’
- Apache Configuration add to
000-default.conf
<VirtualHost *:443>
ServerName sub.domain.com
ProxyPreserveHost On
ProxyPass /api/kernels/ ws://localhost:5000/api/kernels/
ProxyPassReverse /api/kernels/ http://localhost:5000/api/kernels/
ProxyPass / http://localhost:5000/
ProxyPassReverse / http://localhost:5000/
</VirtualHost>
6. Run the following commands to activate apache services
sudo a2enmod proxy
sudo a2enmod proxy_http
sudo a2enmod proxy_wstunnel
7. Restart apache server : sudo service apache2 restart
8. Start jupyter notebook : jupyter notebook
Reference:
0 Comments