From 69515a26c9ddf8a045fcade5edbe059e32fe6ed5 Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Sat, 11 Jun 2016 20:21:08 +0000 Subject: apache2 conf: remove all tiny redirects in the reproducible.debian.net virtaualhost, just 'Redirect permanent /' to t.r-b.o Signed-off-by: Holger Levsen --- .../sites-available/jenkins.debian.net.conf | 167 +-------------------- 1 file changed, 2 insertions(+), 165 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 2d70fa35..d960d367 100644 --- a/hosts/jenkins/etc/apache2/sites-available/jenkins.debian.net.conf +++ b/hosts/jenkins/etc/apache2/sites-available/jenkins.debian.net.conf @@ -168,171 +168,8 @@ Use common-debian-service-https-redirect reproducible-builds.org Use common-directives-ssl-key reproducible.debian.net.key SSLCertificateFile /etc/apache2/ssl/reproducible.debian.net.pem - DocumentRoot /var/lib/jenkins/userContent/reproducible - AddDefaultCharset utf-8 - - - HeaderName .HEADER.html - - - # use reproducible.html as "home page" - RewriteCond %{HTTP_HOST} reproducible\.debian\.net - RewriteCond %{REQUEST_URI} ^/$ - RewriteRule ^/(.*) https://tests.reproducible-builds.org/debian/reproducible.html [R,L] - - # drop the (old|ugly) /userContent/ directory from the url - RewriteCond %{HTTP_HOST} reproducible\.debian\.net - RewriteCond %{REQUEST_FILENAME} !-f - RewriteCond %{REQUEST_FILENAME} !-d - RewriteCond %{REQUEST_URI} ^/userContent - RewriteRule ^/userContent/(.*)$ https://tests.reproducible-builds.org/$1 [R=301,L] - - # redirect rb.d.n/issues/$ISSUE → rb.d.n/debian/issues/unstable/$ISSUE - RewriteCond %{HTTP_HOST} reproducible\.debian\.net - RewriteCond %{REQUEST_FILENAME} !-f - RewriteCond %{REQUEST_FILENAME} !-d - RewriteCond /var/lib/jenkins/userContent/reproducible/debian/issues/unstable/$1 -f - RewriteRule ^/issues/([a-z0-9.+-_]+) https://tests.reproducible-builds.org/debian/issues/unstable/$1 [R=302,L] - - # redirect rb.d.n/$PKG → rb.d.n/debian/rb-pkg/unstable/amd64/$PKG.html - RewriteCond %{HTTP_HOST} reproducible\.debian\.net - 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.+-]+) https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/$1.html [R=302,L] - - # redirect rb.d.n/redirect/?SrcPkg=$PKG → rb.d.n/rb-pkg/unstable/amd64/$PKG.html - RewriteCond %{HTTP_HOST} reproducible\.debian\.net - RewriteCond %{REQUEST_FILENAME} !-f - RewriteCond %{REQUEST_FILENAME} !-d - RewriteCond %{QUERY_STRING} ^(\w+)=([a-z0-9.+-]+)$ - RewriteCond /var/lib/jenkins/userContent/reproducible/debian/rb-pkg/unstable/amd64/%2.html -f - RewriteRule ^/redirect https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/%2.html? [R=302,L] - - # the following two rules are fallbacks for the previous two redirects and should only catch packages which are only in experimental - - # redirect rb.d.n/$PKG → rb.d.n/debian/rb-pkg/experimental/amd64/$PKG.html - RewriteCond %{HTTP_HOST} reproducible\.debian\.net - 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.+-]+) https://tests.reproducible-builds.org/debian/rb-pkg/experimental/amd64/$1.html [R=302,L] - - # redirect rb.d.n/redirect/?SrcPkg=$PKG → rb.d.n/debian/rb-pkg/experimental/amd64/$PKG.html - RewriteCond %{HTTP_HOST} reproducible\.debian\.net - RewriteCond %{REQUEST_FILENAME} !-f - RewriteCond %{REQUEST_FILENAME} !-d - RewriteCond %{QUERY_STRING} ^(\w+)=([a-z0-9.+-]+)$ - RewriteCond /var/lib/jenkins/userContent/reproducible/debian/rb-pkg/experimental/amd64/%2.html -f - RewriteRule ^/redirect https://tests.reproducible-builds.org/debian/rb-pkg/experimental/amd64/%2.html? [R=302,L] - - # redirect rb.d.n/$suite/(amd64|armhf|i386)/$PKG → rb.d.n/rb-pkg/$suite/$arch/$PKG.html - RewriteCond %{HTTP_HOST} reproducible\.debian\.net - 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.+-]+) https://tests.reproducible-builds.org/debian/rb-pkg/$1/$2/$3.html [R=302,L] - - # redirect rb.d.n/rb-pkg/$PKG.html → rb.d.n/debian/rb-pkg/unstable/amd64/$PKG.html - RewriteCond %{HTTP_HOST} reproducible\.debian\.net - 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.+-]+) https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/$1 [R=301,L] - # the same for /dbd/ - RewriteCond %{HTTP_HOST} reproducible\.debian\.net - 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.+-_]+) https://tests.reproducible-builds.org/debian/dbd/unstable/amd64/$1 [R=301,L] - # the same for /rbuild/ - RewriteCond %{HTTP_HOST} reproducible\.debian\.net - 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.+-_]+) https://tests.reproducible-builds.org/debian/rbuild/unstable/amd64/$1 [R=301,L] - # the same for /buildinfo/ - RewriteCond %{HTTP_HOST} reproducible\.debian\.net - 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.+-_]+) https://tests.reproducible-builds.org/debian/buildinfo/unstable/amd64/$1 [R=301,L] - # redirect some rb.d.n/index_*.html to the suite/arch relative one - RewriteCond %{HTTP_HOST} reproducible\.debian\.net - RewriteCond %{REQUEST_FILENAME} !-f - RewriteCond %{REQUEST_FILENAME} !-d - RewriteCond %{REQUEST_URI} ^/index_reproducible.html$ [or] - RewriteCond %{REQUEST_URI} ^/index_FTBR.html$ [or] - RewriteCond %{REQUEST_URI} ^/index_FTBFS.html$ [or] - RewriteCond %{REQUEST_URI} ^/index_depwait.html$ [or] - RewriteCond %{REQUEST_URI} ^/index_404.html$ [or] - RewriteCond %{REQUEST_URI} ^/index_not_for_us.html$ [or] - RewriteCond %{REQUEST_URI} ^/index_blacklisted.html$ [or] - RewriteCond %{REQUEST_URI} ^/index_last_24h.html$ [or] - RewriteCond %{REQUEST_URI} ^/index_last_48h.html$ [or] - RewriteCond %{REQUEST_URI} ^/index_all_abc.html$ - RewriteRule ^/?(.+) https://tests.reproducible-builds.org/debian/unstable/amd64/$1 [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} reproducible\.debian\.net - RewriteCond %{REQUEST_URI} ^/(testing|unstable|experimental)(/|)$ - RewriteRule ^/(.*) https://tests.reproducible-builds.org/debian/$1/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} reproducible\.debian\.net - RewriteCond %{REQUEST_URI} ^/(testing|unstable|experimental)/(amd64|armhf|i386)(/|)$ - RewriteRule ^/([a-z0-9]+)/([a-z0-9]+) https://tests.reproducible-builds.org/debian/$1/index_suite_$2_stats.html [R,L] - - # redirect (/(amd64|armhf|i386) to (/testing|/unstable|/experimental)/index_suite_(amd64|armhf|i386)_stats.html - RewriteCond %{HTTP_HOST} reproducible\.debian\.net - RewriteCond %{REQUEST_URI} ^/(amd64|armhf|i386)(/|)$ - RewriteRule ^/([a-z0-9]+) https://tests.reproducible-builds.org/debian/unstable/index_suite_$1_stats.html [R,L] - - # redirect /coreboot/ to coreboot/coreboot.html - # note: the missing slash in the RewriteRule is wanted to avoid a double slash - RewriteCond %{HTTP_HOST} reproducible\.debian\.net - RewriteCond %{REQUEST_URI} ^/coreboot(/|)$ - RewriteRule ^/(.*) https://tests.reproducible-builds.org/coreboot/coreboot.html [R,L] - - # redirect /openwrt/ to openwrt/openwrt.html - # note: the missing slash in the RewriteRule is wanted to avoid a double slash - RewriteCond %{HTTP_HOST} reproducible\.debian\.net - RewriteCond %{REQUEST_URI} ^/openwrt(/|)$ - RewriteRule ^/(.*) https://tests.reproducible-builds.org/openwrt/openwrt.html [R,L] - - # redirect /netbsd/ to netbsd/netbsd.html - # note: the missing slash in the RewriteRule is wanted to avoid a double slash - RewriteCond %{HTTP_HOST} reproducible\.debian\.net - RewriteCond %{REQUEST_URI} ^/netbsd(/|)$ - RewriteRule ^/(.*) https://tests.reproducible-builds.org/netbsd/netbsd.html [R,L] - - # redirect /freebsd/ to freebsd/freebsd.html - # note: the missing slash in the RewriteRule is wanted to avoid a double slash - RewriteCond %{HTTP_HOST} reproducible\.debian\.net - RewriteCond %{REQUEST_URI} ^/freebsd(/|)$ - RewriteRule ^/(.*) https://tests.reproducible-builds.org/freebsd/freebsd.html [R,L] - - # redirect /archlinux/ to archlinux/archlinux.html - # note: the missing slash in the RewriteRule is wanted to avoid a double slash - RewriteCond %{HTTP_HOST} reproducible\.debian\.net - RewriteCond %{REQUEST_URI} ^/archlinux(/|)$ - RewriteRule ^/(.*) https://tests.reproducible-builds.org/archlinux/archlinux.html [R,L] - - # redirect /issues/ to /index_issues.html - RewriteCond %{HTTP_HOST} reproducible\.debian\.net - RewriteCond %{REQUEST_URI} ^/issues(/|)$ - RewriteRule ^/(.*) https://tests.reproducible-builds.org/index_issues.html [R,L] - - # redirect /fedora properly… - RewriteCond %{HTTP_HOST} reproducible\.debian\.net - RewriteCond %{REQUEST_URI} ^/fedora(/|)$ - RewriteRule ^/?(.*) https://tests.reproducible-builds.org/rpms/fedora-23.html [R,L] - - - Require all granted - - + # just redirect everything to the new hostname + Redirect permanent / https://tests.reproducible-builds.org/ -- cgit v1.2.3-70-g09d2