From e56d7893d7f6d5102769e4a5b7a6090388fb5187 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=B6rdle=20Bot?= Date: Sat, 22 Nov 2025 10:36:57 +0100 Subject: [PATCH] Docs: Add Nginx example configuration --- nginx.conf.example | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 nginx.conf.example diff --git a/nginx.conf.example b/nginx.conf.example new file mode 100644 index 0000000..ac9d471 --- /dev/null +++ b/nginx.conf.example @@ -0,0 +1,41 @@ +server { + listen 80; + server_name your-domain.com; + + # Increase client body size for uploads + client_max_body_size 50M; + + # Proxy to Next.js app + location / { + proxy_pass http://hoerdle:3000; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection 'upgrade'; + proxy_set_header Host $host; + proxy_cache_bypass $http_upgrade; + + # Important: Forward range headers for audio streaming + proxy_set_header Range $http_range; + proxy_set_header If-Range $http_if_range; + proxy_no_cache $http_range $http_if_range; + } + + # Special handling for audio files (optional, for direct serving) + location /uploads/ { + proxy_pass http://hoerdle:3000; + proxy_http_version 1.1; + + # Enable range requests + proxy_set_header Range $http_range; + proxy_set_header If-Range $http_if_range; + proxy_no_cache $http_range $http_if_range; + + # Buffering settings for large files + proxy_buffering off; + proxy_request_buffering off; + + # Timeouts for large files + proxy_read_timeout 300s; + proxy_send_timeout 300s; + } +}