Skip to content

Instantly share code, notes, and snippets.

@efraintorlo
Created January 30, 2022 00:52
Show Gist options
  • Save efraintorlo/9315dd2313a23a5e50011fe0a3212b90 to your computer and use it in GitHub Desktop.
Save efraintorlo/9315dd2313a23a5e50011fe0a3212b90 to your computer and use it in GitHub Desktop.
Nginx config to expose JupyterHub (Use in Local Network Only)
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 80;
server_name 127.0.0.1;
charset utf-8;
client_max_body_size 10M;
location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# websocket headers
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header X-Scheme $scheme;
proxy_buffering off;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment