1 <% if scope.function_has_static_component(['lintian.debian.org']) -%>
3 Use common-dsa-vhost-https-redirect lintian.debian.org
5 <Virtualhost <%= vhost_listen_443 %> >
6 ServerName lintian.debian.org
7 ServerAdmin lintian-maint@debian.org
9 ErrorLog /var/log/apache2/lintian.debian.org-error.log
10 CustomLog /var/log/apache2/lintian.debian.org-access.log privacyssl
12 Use common-debian-service-ssl lintian.debian.org
15 <IfModule mod_userdir.c>
19 DocumentRoot /srv/static.debian.org/mirrors/lintian.debian.org/cur
20 AddDefaultCharset utf-8
22 <Directory /srv/static.debian.org/mirrors/lintian.debian.org/cur>
23 <% if @lsbmajdistrelease > '7' -%>
27 # These three lines makes apache serve
28 # "lintian.log.gz" as a text/plain with encoding gzip
29 # making it easier to view the log in the browser.
31 AddEncoding x-gzip .gz
32 AddType text/plain .log
34 <IfModule mod_userdir.c>
35 AddOutputFilterByType DEFLATE image/svg+xml
36 AddOutputFilterByType DEFLATE text/plain
40 <Directory /srv/static.debian.org/mirrors/lintian.debian.org/cur/resources>
41 # Cache these for a year (3600 * 24 * 365.25)
42 # Files in here will change name if their content change
43 Header set Cache-Control "max-age=31557600, public"
47 RewriteMap source-map txt:/srv/static.debian.org/mirrors/lintian.debian.org/cur/lookup-tables/source-packages
49 # Re-direct from the "old" locations to the new ones
50 RewriteRule ^/reports/T(.*)\.html$ /tags/$1.html [L,R=permanent]
51 RewriteRule ^/reports/(.*)$ /$1 [L,R=permanent]
53 # Map source packages to reports (this mapping is re-written once per lintian run,
54 # serve it as a 302 rather than a permanent redirect)
55 # Version-less request
56 RewriteRule ^/source/([a-z0-9-]+)/?$ /${source-map:$1} [L,R,NE]
58 RewriteRule ^/source/([a-z0-9-]+)/([a-zA-Z0-9.+:~-]+)$ /${source-map:$1/$2} [L,R,NE]