From d35f07dd0ea5a149c04bec71c873933d0455b4df Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Sat, 6 Apr 2019 14:45:01 +0200 Subject: [PATCH] Snapshot: do requests for /file/ directly from the filesystem --- modules/roles/manifests/snapshot_web.pp | 1 + .../roles/templates/snapshot/snapshot.debian.org.conf.erb | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/modules/roles/manifests/snapshot_web.pp b/modules/roles/manifests/snapshot_web.pp index 083f6e03e..37e171147 100644 --- a/modules/roles/manifests/snapshot_web.pp +++ b/modules/roles/manifests/snapshot_web.pp @@ -1,5 +1,6 @@ class roles::snapshot_web { include apache2 + include apache2::headers include apache2::rewrite # snapshot abusers diff --git a/modules/roles/templates/snapshot/snapshot.debian.org.conf.erb b/modules/roles/templates/snapshot/snapshot.debian.org.conf.erb index 2b4e9b812..9a9b190c5 100644 --- a/modules/roles/templates/snapshot/snapshot.debian.org.conf.erb +++ b/modules/roles/templates/snapshot/snapshot.debian.org.conf.erb @@ -37,6 +37,14 @@ WSGIDaemonProcess snapshot.debian.org user=nobody group=nogroup home=/ processes + AliasMatch "^/file/([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{36})$" "/srv/snapshot.debian.org/farm/$1/$2/$1$2$3" + + Require all granted + #ExpiresActive on + #ExpiresDefault "access plus 1 year" + Header set Cache-Control "max-age=31536000, public" + + WSGIScriptAlias / /srv/snapshot.debian.org/bin/snapshot.wsgi WSGIProcessGroup snapshot.debian.org -- 2.20.1