Skip to content

Instantly share code, notes, and snippets.

@noosxe
Created March 22, 2020 21:03
Show Gist options
  • Save noosxe/c5293726bb401be845c7986e40cc9932 to your computer and use it in GitHub Desktop.
Save noosxe/c5293726bb401be845c7986e40cc9932 to your computer and use it in GitHub Desktop.
nginx config for running jupyterhub behind a reverse proxy
server {
listen 80;
server_name subdomain.example.com;
location / {
proxy_pass http://localhost:1600;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_redirect default;
#proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-User $http_authorization;
proxy_max_temp_file_size 0;
#this is the maximum upload size
client_max_body_size 20m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment