From d47b8496a75965faead8511c5fc9ff5649a0dfa4 Mon Sep 17 00:00:00 2001 From: "marco.piovanello" Date: Wed, 25 Oct 2023 13:46:13 +0200 Subject: [PATCH] added example nginx and caddy configs --- .dockerignore | 1 + examples/Caddyfile | 5 +++++ examples/nginx.conf | 37 +++++++++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+) create mode 100644 examples/Caddyfile create mode 100644 examples/nginx.conf diff --git a/.dockerignore b/.dockerignore index 7cb0604..f1ff59e 100644 --- a/.dockerignore +++ b/.dockerignore @@ -15,3 +15,4 @@ yt-dlp-webui session.dat config.yml cookies.txt +examples/ \ No newline at end of file diff --git a/examples/Caddyfile b/examples/Caddyfile new file mode 100644 index 0000000..0f1ca17 --- /dev/null +++ b/examples/Caddyfile @@ -0,0 +1,5 @@ +resource.yourdomain.tld { + handle_path /yt-dlp-webui/* { + reverse_proxy 127.0.0.1:3033 + } +} \ No newline at end of file diff --git a/examples/nginx.conf b/examples/nginx.conf new file mode 100644 index 0000000..e038a3b --- /dev/null +++ b/examples/nginx.conf @@ -0,0 +1,37 @@ +worker_processes 1; + +events { + worker_connections 1024; +} + + +http { + include mime.types; + + default_type application/octet-stream; + + sendfile on; + keepalive_timeout 65; + + gzip on; + + server { + listen 80; + server_name localhost; + + location ~/yt-dlp/(.*)$ { + proxy_pass http://127.0.0.1:3033/$1; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Host $http_host; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + + client_max_body_size 20000m; + proxy_connect_timeout 3000; + proxy_send_timeout 3000; + proxy_read_timeout 3000; + send_timeout 3000; + } + } + }