From 691014286cee2667ea0cd6422632d1420b047de1 Mon Sep 17 00:00:00 2001 From: Julian Mutter Date: Sun, 21 Jun 2026 13:21:09 +0200 Subject: [PATCH] Switch from nginx to caddy --- hosting/Caddyfile | 13 +++++++++++++ hosting/nginx-http.conf | 13 ------------- 2 files changed, 13 insertions(+), 13 deletions(-) create mode 100644 hosting/Caddyfile delete mode 100644 hosting/nginx-http.conf diff --git a/hosting/Caddyfile b/hosting/Caddyfile new file mode 100644 index 000000000..a4d5906fd --- /dev/null +++ b/hosting/Caddyfile @@ -0,0 +1,13 @@ +:8080 { + # 1. Exact match redirect from root to the repo + redir / /fdroid/repo/ 302 + + # 2. Redirect without trailing slash to ensure correct routing + redir /fdroid/repo /fdroid/repo/ 302 + + # 3. Strip '/fdroid/repo' from the URL and serve the underlying files + handle_path /fdroid/repo/* { + root * /repo/fdroid/repo + file_server browse + } +} diff --git a/hosting/nginx-http.conf b/hosting/nginx-http.conf deleted file mode 100644 index f30a41478..000000000 --- a/hosting/nginx-http.conf +++ /dev/null @@ -1,13 +0,0 @@ -server { - listen 8080; - server_name = fdroid.julian-mutter.de; - - location = / { - return 302 /fdroid/repo; - } - - location /fdroid/repo { - alias /repo/fdroid/repo/; - autoindex on; - } -}