From 354c0e2e3f09c73524121b22c0572ce917a5c896 Mon Sep 17 00:00:00 2001 From: "David M. Klein" <4+leander19961@noreply.localhost> Date: Wed, 2 Sep 2026 11:01:17 +0200 Subject: [PATCH] Dateien nach "nginx/conf.d" hochladen --- nginx/conf.d/repo.conf | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 nginx/conf.d/repo.conf diff --git a/nginx/conf.d/repo.conf b/nginx/conf.d/repo.conf new file mode 100644 index 0000000..96541e0 --- /dev/null +++ b/nginx/conf.d/repo.conf @@ -0,0 +1,33 @@ +server { + listen 80; + server_name _; + + # --- DNF-Spiegel (dieser Compose-Stack) ------------------------------- + location /dnf/ { + root /usr/share/nginx/html; + autoindex on; + } + + # repomd.xml (und dessen Signatur) sind der einzige Teil, den dnf bei + # jedem Zugriff neu abruft - nicht cachen, sonst sehen Clients neue + # Pakete erst verzoegert. Regex-Location gewinnt hier gegenueber der + # praefix-location /dnf/ oben (nginx-Standardverhalten). + location ~* ^/dnf/.+/repodata/repomd\.xml(\.asc)?$ { + root /usr/share/nginx/html; + add_header Cache-Control "no-cache"; + } + + # --- Flatpak-Spiegel ---------------------------------------------------- + # Laeuft laut Ausgangslage bereits (Flathub-Filter-Mirror). Falls er in + # einem eigenen Container/Stack laeuft, hier per proxy_pass anbinden, + # damit beide Repos unter derselben Domain erreichbar sind, z.B.: + # + # location /flatpak/ { + # proxy_pass http://flatpak-mirror:8080/; + # proxy_set_header Host $host; + # } + # + # Laeuft er stattdessen schon selbst per Nginx auf diesem Host, reicht es, + # diesen Server-Block stattdessen als zusaetzlichen server{}/location{} in + # dessen bestehende Konfiguration zu uebernehmen statt diesen hier zu nutzen. +}