v1.0.0
Environment introduction
1、 The virtual machine on this machine. There is jupyter in the virtual machine
2、 Jupyter notebook web server is an online editor
3、 A proxy server on this machine, such as nginx
Configuration steps
1、 Virtual machine
Start the virtual machine
2、 Jupyter
Set the root directory of the file
sudo GEDIT (VIM) ~ /. Jupyter/jupyter_ notebook_ config.py
c.NotebookApp.notebook_dir = '/path/to/jupyter'
sudo gedit(vim)~/.jupyter/jupyter notebook config.py
c.NotebookApp.allow_origin = '*' # allow cors
3、 Nginx
Start nginx configuration nginx.conf excerpt
# Actual tcp/websocket server address
upstream jupyter_url {
server virtual machine ip:8888;
}
server {
listen 8000;
server_name localhost;
charset utf-8;
location/{
proxy_pass http://jupyter_url;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
Test effect
Visit: nginxip: 8000
Read More:
- Change Jupyter Notebook Default Directory
- [Fixed]Error executing Jupyter command ‘notebook’: [Errno ‘jupyter-notebook’ not found] 2
- Setting up a virtual environment for jupyter notebook
- Exception: jupyter command Jupiter notebook not found
- Jupyter failed to run websocket error
- On the kernel error of jupyter notebook
- WebSocket failed: Error during WebSocket handshake: Unexpected response code: 400
- Deployment project websocket failed: error during websocket Handshake: unexpected response code: 400
- Jupyter notebook couldn’t find CONDA’s virtual environment
- Error importing keras in jupyter Notebook: modulenotfounderror: no module named ‘keras’ solution
- Error converting jupyter notebook to PDF
- Error kernel restart: restart failed was reported in the background of jupyter notebook
- [Solved] Jupyter Notebook Error 500: Internal Server Error
- Solve the problem that “figure size 640×480 with 1 axes” does not display pictures in jupyter notebook
- Nginx startup error: nginx: [error] open() “/ var / run / nginx/ nginx.pid The solution of “failed (2: no such file or directory)”
- nginx: [error] open() "/var/run/nginx/nginx.pid" failed (2: No such file or directory)
- Nginx Error:HTTP 1.0 client does not support chunked response
- nginx: [error] open() “/usr/local/nginx/logs/nginx.pid“ failed (2: No such file or directory)
- failed: Error during WebSocket handshake: Unexpected response code: 400
- Error occurs when configuring nginx installation information. / configure: error: the HTTP rewrite module requires the PCRE library. You can