Created
March 13, 2025 02:57
-
-
Save walice/e2ad86a022cc4d7a435abcbd9e244b51 to your computer and use it in GitHub Desktop.
Contents of the Nginx configuration file for the multi-user JupyterHub. This file should be placed in `/etc/nginx/sites-available/training`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server { | |
| server_name <yourdomain.com>; | |
| listen 80; | |
| # RStudio Proxy | |
| location /rstudio/ { | |
| proxy_pass http://127.0.0.1:8787/; | |
| proxy_set_header Host $host; | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| proxy_set_header Upgrade $http_upgrade; | |
| proxy_set_header Connection "upgrade"; | |
| } | |
| # JupyterHub Proxy | |
| location /jupyter/ { | |
| proxy_pass http://127.0.0.1:8000/jupyter/; | |
| proxy_set_header Host $host; | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| proxy_set_header Upgrade $http_upgrade; | |
| proxy_set_header Connection "upgrade"; | |
| } | |
| # Static Assets for JupyterHub | |
| location /jupyter/hub/static/ { | |
| proxy_pass http://127.0.0.1:8000/jupyter/hub/static/; | |
| proxy_set_header Host $host; | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment