1 <Virtualhost <%= vhost_listen %> >
2 ServerName lintian.debian.org
3 ServerAdmin lintian-maint@debian.org
5 ErrorLog /var/log/apache2/lintian.debian.org-error.log
6 CustomLog /var/log/apache2/lintian.debian.org-access.log privacy
8 <IfModule mod_userdir.c>
12 DocumentRoot /srv/static.debian.org/mirrors/lintian.debian.org/cur
13 AddDefaultCharset utf-8
15 <Directory /srv/static.debian.org/mirrors/lintian.debian.org/cur>
16 # These two lines makes apache serve "lintian.log.gz" as a text/plain with encoding gzip
17 # making it easier to view the log in the browser.
19 AddEncoding x-gzip .gz
20 AddType text/plain .log
22 <IfModule mod_userdir.c>
23 AddOutputFilterByType DEFLATE image/svg+xml
24 AddOutputFilterByType DEFLATE text/plain
28 <Directory /srv/static.debian.org/mirrors/lintian.debian.org/cur/graphs>
29 # Cache graphs for an hour (Technically, a "expires" of "24h after last mod"
30 # might be better, but oh well)
31 Header set Cache-Control "max-age=3600, must-revalidate, public"
34 <Directory /srv/static.debian.org/mirrors/lintian.debian.org/cur/resources>
35 # Cache these for a year (3600 * 24 * 365.25)
36 # Files in here will change name if their content change
37 Header set Cache-Control "max-age=31557600, public"
41 RewriteMap source-map txt:/srv/static.debian.org/mirrors/lintian.debian.org/cur/lookup-tables/source-packages
43 # Re-direct from the "old" locations to the new ones
44 RewriteRule ^/reports/T(.*)\.html$ /tags/$1.html [L,R=permanent]
45 RewriteRule ^/reports/(.*)$ /$1 [L,R=permanent]
47 # Map source packages to reports (this mapping is re-written once per lintian run,
48 # serve it as a 302 rather than a permanent redirect)
49 # Version-less request
50 RewriteRule ^/source/([a-z0-9-]+)/?$ /${source-map:$1} [L,R,NE]
52 RewriteRule ^/source/([a-z0-9-]+)/([a-zA-Z0-9.+:~-]+)$ /${source-map:$1/$2} [L,R,NE]