43 lines
1.3 KiB
Plaintext
43 lines
1.3 KiB
Plaintext
# Wird beim Start per envsubst nach /etc/nginx/conf.d/default.conf geschrieben.
|
|
map $http_upgrade $connection_upgrade {
|
|
default upgrade;
|
|
'' close;
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
server_name _;
|
|
return 301 https://$host:${HTTPS_PORT}$request_uri;
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl;
|
|
http2 on;
|
|
server_name _;
|
|
|
|
ssl_certificate /etc/nginx/certs/fullchain.pem;
|
|
ssl_certificate_key /etc/nginx/certs/privkey.pem;
|
|
ssl_protocols TLSv1.2 TLSv1.3;
|
|
ssl_session_cache shared:SSL:1m;
|
|
|
|
# Muss >= MAX_CLIP_MB des Servers sein (plus etwas Luft fuer die Verschluesselung)
|
|
client_max_body_size ${NGINX_MAX_BODY};
|
|
# Uploads/Downloads direkt durchreichen statt zwischenzuspeichern
|
|
proxy_request_buffering off;
|
|
proxy_buffering off;
|
|
|
|
location / {
|
|
proxy_pass http://netclip:8080;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $connection_upgrade;
|
|
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 X-Forwarded-Proto https;
|
|
# WebSocket-Verbindungen bleiben lange offen (Clients pingen alle 30 s)
|
|
proxy_read_timeout 3600s;
|
|
proxy_send_timeout 3600s;
|
|
}
|
|
}
|