jupyter/nginx/conf.d/jupyterhub.conf
2025-07-15 18:40:59 +02:00

44 lines
891 B
Plaintext

# Shared proxy headers
include /etc/nginx/snippets/proxy-headers.conf;
server {
listen 80 default_server;
server_name _;
location /jupyter/ {
proxy_pass http://jupyterhub:8000/; # Docker service name
# Apply shared proxy headers
include /etc/nginx/snippets/proxy-headers.conf;
# Special WebSocket timeout
proxy_read_timeout 86400;
}
# Redirect /jupyter to /jupyter/
location = /jupyter {
return 302 /jupyter/;
}
# Stativ site conf
root /var/www/static;
index index.html;
location / {
try_files $uri $uri/ =404;
}
# Cache static assets
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
expires 30d;
add_header Cache-Control "public, no-transform";
}
# Deny access to hidden files
location ~ /\. {
deny all;
}
}