From 0c3d1b6b10e40c981320eba1a1fd41a6ec91747e Mon Sep 17 00:00:00 2001 From: Andrii Nikitin <anikitin@suse.de> Date: Sep 19 2022 13:29:08 +0000 Subject: Change web_mirrors to just proxy routes on download.o.o Previously the service was relying on additional package installed and a cron job for generation of the webpages (which were not salted properly). Now no additional dependencies besides the proxy. --- diff --git a/pillar/role/web_mirrors.sls b/pillar/role/web_mirrors.sls index a048a16..ee85541 100644 --- a/pillar/role/web_mirrors.sls +++ b/pillar/role/web_mirrors.sls @@ -19,10 +19,13 @@ nginx: - server: - listen: {{ ip4_private }}:80 - location /: - - root: /srv/www/vhosts/mirrors.opensuse.org - - index: - - index.html - - index.htm + - proxy_pass: http://download.opensuse.org/report/mirrors + - location ~ /(asset|report)/: + - proxy_pass: http://download.opensuse.org/report/$1/ + - location ~ /(admin|app|geoip|download|rest|minion|login|logout|session|mojo)(.*): + - return: 301 $scheme://download.opensuse.org/$1$2 + - location ~ /(debug|distribution|factory|ports|repositories|source|tumbleweed|update)(.*): + - return: 301 $scheme://download.opensuse.org/$1$2 - location = /50x.html: - root: /srv/www/htdocs enabled: True