From: Peter Palfrader Date: Sat, 6 Apr 2019 12:45:01 +0000 (+0200) Subject: Snapshot: do requests for /file/ directly from the filesystem X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=d35f07dd0ea5a149c04bec71c873933d0455b4df;p=mirror%2Fdsa-puppet.git Snapshot: do requests for /file/ directly from the filesystem --- 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