diff options
author | Holger Levsen <holger@layer-acht.org> | 2016-01-11 14:13:02 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2016-01-11 14:13:02 +0100 |
commit | a7cdb63f623cd848a7fec33550ece232caba72f0 (patch) | |
tree | 344a6b2b58ee157768e8a5bdb17a94eaf0603998 /hosts/jenkins/etc/apache2 | |
parent | d9aab471acf40e518390084245d3e4892577e38a (diff) | |
download | jenkins.debian.net-a7cdb63f623cd848a7fec33550ece232caba72f0.tar.xz |
new virtual host: tests.reproducible-builds.org (please dont announce it yet)
Diffstat (limited to 'hosts/jenkins/etc/apache2')
-rw-r--r-- | hosts/jenkins/etc/apache2/sites-available/jenkins.debian.net.conf | 168 |
1 files changed, 168 insertions, 0 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 b325a291..a81f04da 100644 --- a/hosts/jenkins/etc/apache2/sites-available/jenkins.debian.net.conf +++ b/hosts/jenkins/etc/apache2/sites-available/jenkins.debian.net.conf @@ -97,6 +97,7 @@ Use localhost-directives 10.0.2.1 Use common-debian-service-https-redirect jenkins.debian.net Use common-debian-service-https-redirect reproducible.debian.net +Use common-debian-service-https-redirect tests.reproducible-builds.org Use common-debian-service-https-redirect reproducible-builds.org <VirtualHost *:443> @@ -331,6 +332,173 @@ Use common-debian-service-https-redirect reproducible-builds.org </VirtualHost> <VirtualHost *:443> + Use common-directives tests.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 + + <Directory /var/lib/jenkins/userContent/reproducible/artifacts> + HeaderName .HEADER.html + </Directory> + + # use reproducible.html as "home page" + RewriteCond %{HTTP_HOST} tests\.reproducible-builds\.org + RewriteCond %{REQUEST_URI} ^/$ + RewriteRule ^/(.*) /reproducible.html [R,L] + + # drop the (old|ugly) /userContent/ directory from the url + RewriteCond %{HTTP_HOST} tests\.reproducible-builds\.org + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-d + RewriteCond %{REQUEST_URI} ^/userContent + RewriteRule ^/userContent/(.*)$ /$1 [R=301,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/issues/unstable/$1 -f + RewriteRule ^/issues/([a-z0-9.+-_]+) /issues/unstable/$1 [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/rb-pkg/unstable/amd64/$1.html -f + RewriteRule ^/([a-z0-9.+-]+) /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} tests\.reproducible-builds\.org + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-d + RewriteCond %{QUERY_STRING} ^(\w+)=([a-z0-9.+-]+)$ + RewriteCond /var/lib/jenkins/userContent/reproducible/rb-pkg/unstable/amd64/%2.html -f + RewriteRule ^/redirect /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/rb-pkg/experimental/amd64/$PKG.html + RewriteCond %{HTTP_HOST} tests\.reproducible-builds\.org + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-d + RewriteCond /var/lib/jenkins/userContent/reproducible/rb-pkg/experimental/amd64/$1.html -f + RewriteRule ^/([a-z0-9.+-]+) /rb-pkg/experimental/amd64/$1.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 + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-d + RewriteCond %{QUERY_STRING} ^(\w+)=([a-z0-9.+-]+)$ + RewriteCond /var/lib/jenkins/userContent/reproducible/rb-pkg/experimental/amd64/%2.html -f + RewriteRule ^/redirect /rb-pkg/experimental/amd64/%2.html? [R=302,L] + + # redirect rb.d.n/$suite/(amd64|armhf)/$PKG → rb.d.n/rb-pkg/$suite/$arch/$PKG.html + RewriteCond %{HTTP_HOST} tests\.reproducible-builds\.org + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-d + RewriteCond /var/lib/jenkins/userContent/reproducible/rb-pkg/$1/$2/$3.html -f + RewriteRule ^/(unstable|testing|experimental)/([a-z0-9]+)/([a-z0-9.+-]+) /rb-pkg/$1/$2/$3.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/rb-pkg/unstable/amd64/$1 -f + RewriteRule ^/rb-pkg/([a-z0-9.+-]+) /rb-pkg/unstable/amd64/$1 [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/dbd/unstable/amd64/$1 -f + RewriteRule ^/dbd/([a-z0-9.+-_]+) /dbd/unstable/amd64/$1 [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/rbuild/unstable/amd64/$1 -f + RewriteRule ^/rbuild/([a-z0-9.+-_]+) /rbuild/unstable/amd64/$1 [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/buildinfo/unstable/amd64/$1 -f + RewriteRule ^/buildinfo/([a-z0-9.+-_]+) /buildinfo/unstable/amd64/$1 [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 + 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 ^/?(.+) /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} tests\.reproducible-builds\.org + RewriteCond %{REQUEST_URI} ^/(testing|unstable|experimental)/$ + RewriteRule ^/(.*) /$1index_suite_amd64_stats.html [R,L] + + # redirect (/testing|unstable|/experimental)/(amd64|armhf) to (/testing|/unstable|/experimental)/index_suite_(amd64|armhf)_stats.html + RewriteCond %{HTTP_HOST} tests\.reproducible-builds\.org + RewriteCond %{REQUEST_URI} ^/(testing|unstable|experimental)/(amd64|armhf)/$ + RewriteRule ^/([a-z0-9]+)/([a-z0-9]+) /$1/index_suite_$2_stats.html [R,L] + + # redirect (/(amd64|armhf) to (/testing|/unstable|/experimental)/index_suite_(amd64|armhf)_stats.html + RewriteCond %{HTTP_HOST} tests\.reproducible-builds\.org + RewriteCond %{REQUEST_URI} ^/(amd64|armhf)(/|)$ + RewriteRule ^/([a-z0-9]+) /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} tests\.reproducible-builds\.org + RewriteCond %{REQUEST_URI} ^/coreboot/$ + RewriteRule ^/(.*) /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} tests\.reproducible-builds\.org + RewriteCond %{REQUEST_URI} ^/openwrt/$ + RewriteRule ^/(.*) /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} tests\.reproducible-builds\.org + RewriteCond %{REQUEST_URI} ^/netbsd/$ + RewriteRule ^/(.*) /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} tests\.reproducible-builds\.org + RewriteCond %{REQUEST_URI} ^/freebsd/$ + RewriteRule ^/(.*) /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} tests\.reproducible-builds\.org + RewriteCond %{REQUEST_URI} ^/archlinux/$ + RewriteRule ^/(.*) /archlinux/archlinux.html [R,L] + + # redirect /issues/ to /index_issues.html + RewriteCond %{REQUEST_URI} ^/issues/$ + RewriteRule ^/(.*) /index_issues.html [R,L] + + <Proxy *> + Require all granted + </Proxy> + +</VirtualHost> + + +<VirtualHost *:443> Use common-directives reproducible-builds.org Use common-directives-ssl-chain startcom.crt SSLCertificateFile /etc/apache2/ssl/reproducible-builds.org.pem |