diff options
-rw-r--r-- | hosts/jenkins/etc/apache2/sites-available/jenkins.debian.net.conf | 46 |
1 files changed, 26 insertions, 20 deletions
diff --git a/hosts/jenkins/etc/apache2/sites-available/jenkins.debian.net.conf b/hosts/jenkins/etc/apache2/sites-available/jenkins.debian.net.conf index 4f01a075..90681279 100644 --- a/hosts/jenkins/etc/apache2/sites-available/jenkins.debian.net.conf +++ b/hosts/jenkins/etc/apache2/sites-available/jenkins.debian.net.conf @@ -360,19 +360,25 @@ Use common-debian-service-https-redirect reproducible-builds.org RewriteCond %{REQUEST_URI} ^/userContent RewriteRule ^/userContent/(.*)$ /$1 [R=301,L] + # redirect debian specific requests from rb.d.n/$URI → rb.d.n/debian/$URI + RewriteCond %{HTTP_HOST} tests\.reproducible-builds\.org + RewriteCond /var/lib/jenkins/userContent/reproducible/debian/$1.html -f + RewriteCond %{REQUEST_URI} ^/(static|testing|unstable|experimental|history|rb-pg|notes|issues|rbuild|logs|dbd|dbdtxt|index_.*\.html|stats_.*\.png|reproducible.*\.json).*$ + RewriteRule ^/(.*) /debian/$1 [R=302,L] + # redirect rb.d.n/issues/$ISSUE → rb.d.n/issues/unstable/$ISSUE RewriteCond %{HTTP_HOST} tests\.reproducible-builds\.org RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond /var/lib/jenkins/userContent/reproducible/debian/issues/unstable/$1 -f - RewriteRule ^/issues/([a-z0-9.+-_]+) /debian/issues/unstable/$1 [R=302,L] + RewriteRule ^/(debian/|)issues/([a-z0-9.+-_]+) /debian/issues/unstable/$2 [R=302,L] # redirect rb.d.n/$PKG → rb.d.n/rb-pkg/unstable/amd64/$PKG.html RewriteCond %{HTTP_HOST} tests\.reproducible-builds\.org RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d - RewriteCond /var/lib/jenkins/userContent/reproducible/debian/rb-pkg/unstable/amd64/$1.html -f - RewriteRule ^/([a-z0-9.+-]+) /debian/rb-pkg/unstable/amd64/$1.html [R=302,L] + RewriteCond /var/lib/jenkins/userContent/reproducible/debian/rb-pkg/unstable/amd64/$2.html -f + RewriteRule ^/(debian/|)([a-z0-9.+-]+) /debian/rb-pkg/unstable/amd64/$2.html [R=302,L] # redirect rb.d.n/redirect/?SrcPkg=$PKG → rb.d.n/rb-pkg/unstable/amd64/$PKG.html RewriteCond %{HTTP_HOST} tests\.reproducible-builds\.org @@ -388,8 +394,8 @@ Use common-debian-service-https-redirect reproducible-builds.org RewriteCond %{HTTP_HOST} tests\.reproducible-builds\.org RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d - RewriteCond /var/lib/jenkins/userContent/reproducible/debian/rb-pkg/experimental/amd64/$1.html -f - RewriteRule ^/([a-z0-9.+-]+) /debian/rb-pkg/experimental/amd64/$1.html [R=302,L] + RewriteCond /var/lib/jenkins/userContent/reproducible/debian/rb-pkg/experimental/amd64/$2.html -f + RewriteRule ^/(debian/|)([a-z0-9.+-]+) /debian/rb-pkg/experimental/amd64/$2.html [R=302,L] # redirect rb.d.n/redirect/?SrcPkg=$PKG → rb.d.n/rb-pkg/experimental/amd64/$PKG.html RewriteCond %{HTTP_HOST} tests\.reproducible-builds\.org @@ -403,33 +409,33 @@ Use common-debian-service-https-redirect reproducible-builds.org RewriteCond %{HTTP_HOST} tests\.reproducible-builds\.org RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d - RewriteCond /var/lib/jenkins/userContent/reproducible/debian/rb-pkg/$1/$2/$3.html -f - RewriteRule ^/(unstable|testing|experimental)/([a-z0-9]+)/([a-z0-9.+-]+) /debian/rb-pkg/$1/$2/$3.html [R=302,L] + RewriteCond /var/lib/jenkins/userContent/reproducible/debian/rb-pkg/$2/$3/$4.html -f + RewriteRule ^/(debian/|)(unstable|testing|experimental)/([a-z0-9]+)/([a-z0-9.+-]+) /debian/rb-pkg/$2/$3/$4.html [R=302,L] # redirect rb.d.n/rb-pkg/$PKG.html → rb.d.n/rb-pkg/unstable/amd64/$PKG.html RewriteCond %{HTTP_HOST} tests\.reproducible-builds\.org RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d - RewriteCond /var/lib/jenkins/userContent/reproducible/debian/rb-pkg/unstable/amd64/$1 -f - RewriteRule ^/rb-pkg/([a-z0-9.+-]+) /debian/rb-pkg/unstable/amd64/$1 [R=301,L] + RewriteCond /var/lib/jenkins/userContent/reproducible/debian/rb-pkg/unstable/amd64/$2 -f + RewriteRule ^/(debian/|)rb-pkg/([a-z0-9.+-]+) /debian/rb-pkg/unstable/amd64/$2 [R=301,L] # the same for /dbd/ RewriteCond %{HTTP_HOST} tests\.reproducible-builds\.org RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d - RewriteCond /var/lib/jenkins/userContent/reproducible/debian/dbd/unstable/amd64/$1 -f - RewriteRule ^/dbd/([a-z0-9.+-_]+) /debian/dbd/unstable/amd64/$1 [R=301,L] + RewriteCond /var/lib/jenkins/userContent/reproducible/debian/dbd/unstable/amd64/$2 -f + RewriteRule ^/(debian/|)dbd/([a-z0-9.+-_]+) /debian/dbd/unstable/amd64/$2 [R=301,L] # the same for /rbuild/ RewriteCond %{HTTP_HOST} tests\.reproducible-builds\.org RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d - RewriteCond /var/lib/jenkins/userContent/reproducible/debian/rbuild/unstable/amd64/$1 -f - RewriteRule ^/rbuild/([a-z0-9.+-_]+) /debian/rbuild/unstable/amd64/$1 [R=301,L] + RewriteCond /var/lib/jenkins/userContent/reproducible/debian/rbuild/unstable/amd64/$2 -f + RewriteRule ^/(debian/|)rbuild/([a-z0-9.+-_]+) /debian/rbuild/unstable/amd64/$2 [R=301,L] # the same for /buildinfo/ RewriteCond %{HTTP_HOST} tests\.reproducible-builds\.org RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d - RewriteCond /var/lib/jenkins/userContent/reproducible/debian/buildinfo/unstable/amd64/$1 -f - RewriteRule ^/buildinfo/([a-z0-9.+-_]+) /debian/buildinfo/unstable/amd64/$1 [R=301,L] + RewriteCond /var/lib/jenkins/userContent/reproducible/debian/buildinfo/unstable/amd64/$2 -f + RewriteRule ^/(debian/|)buildinfo/([a-z0-9.+-_]+) /debian/buildinfo/unstable/amd64/$2 [R=301,L] # redirect some rb.d.n/index_*.html to the suite/arch relative one RewriteCond %{HTTP_HOST} tests\.reproducible-builds\.org RewriteCond %{REQUEST_FILENAME} !-f @@ -444,23 +450,23 @@ Use common-debian-service-https-redirect reproducible-builds.org RewriteCond %{REQUEST_URI} ^/index_last_24h.html$ [or] RewriteCond %{REQUEST_URI} ^/index_last_48h.html$ [or] RewriteCond %{REQUEST_URI} ^/index_all_abc.html$ - RewriteRule ^/?(.+) /debian/unstable/amd64/$1 [R=301,L] + RewriteRule ^/(debian/|)?(.+) /debian/unstable/amd64/$2 [R=301,L] # redirect (/testing|unstable|/experimental) to (/testing|/unstable|/experimental)/index_suite_amd64_stats.html # note: the missing slash in the RewriteRule is wanted to avoid a double slash RewriteCond %{HTTP_HOST} tests\.reproducible-builds\.org RewriteCond %{REQUEST_URI} ^/(testing|unstable|experimental)(/|)$ - RewriteRule ^/(.*) /debian/$1/index_suite_amd64_stats.html [R,L] + RewriteRule ^/(debian/|)(.*) /debian/$2/index_suite_amd64_stats.html [R,L] # redirect (/testing|unstable|/experimental)/(amd64|armhf|i386) to (/testing|/unstable|/experimental)/index_suite_(amd64|armhf|i386)_stats.html RewriteCond %{HTTP_HOST} tests\.reproducible-builds\.org RewriteCond %{REQUEST_URI} ^/(testing|unstable|experimental)/(amd64|armhf|i386)(/|)$ - RewriteRule ^/([a-z0-9]+)/([a-z0-9]+) /debian/$1/index_suite_$2_stats.html [R,L] + RewriteRule ^/(debian/|)([a-z0-9]+)/([a-z0-9]+) /debian/$2/index_suite_$3_stats.html [R,L] # redirect (/(amd64|armhf|i386) to (/testing|/unstable|/experimental)/index_suite_(amd64|armhf|i386)_stats.html RewriteCond %{HTTP_HOST} tests\.reproducible-builds\.org RewriteCond %{REQUEST_URI} ^/(amd64|armhf|i386)(/|)$ - RewriteRule ^/([a-z0-9]+) /debian/unstable/index_suite_$1_stats.html [R,L] + RewriteRule ^/(debian/|)([a-z0-9]+) /debian/unstable/index_suite_$2_stats.html [R,L] # redirect /coreboot/ to coreboot/coreboot.html # note: the missing slash in the RewriteRule is wanted to avoid a double slash @@ -500,7 +506,7 @@ Use common-debian-service-https-redirect reproducible-builds.org # redirect /issues/ to /index_issues.html RewriteCond %{HTTP_HOST} tests\.reproducible-builds\.org RewriteCond %{REQUEST_URI} ^/issues(/|)$ - RewriteRule ^/(.*) /debian/index_issues.html [R,L] + RewriteRule ^/(debian/|)(.*) /debian/index_issues.html [R,L] # temporary redirect until the html is rewritten RewriteCond %{HTTP_HOST} tests\.reproducible-builds\.org |