44 lines
891 B
Plaintext
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;
|
|
}
|
|
|
|
}
|