1 # Need to turn on negotiation_module
2 <Directory %TOPDIR%/www/>
3 Options +MultiViews +FollowSymLinks +Indexes
4 AddHandler type-map var
5 # Make sure that the srm.conf directive is commented out.
6 AddDefaultCharSet utf-8
7 AllowOverride AuthConfig FileInfo
11 ExpiresDefault "access plus 1 day"
12 ExpiresByType image/gif "access plus 1 week"
13 ExpiresByType image/jpeg "access plus 1 week"
16 # you need to keep this in sync with lib/Packages/I18N/Locale.pm
19 AddLanguage en-us .en-us
20 AddLanguage en-gb .en-gb
44 AddLanguage pt-pt .pt_PT
45 AddLanguage pt-br .pt_BR
53 AddLanguage zh-CN .zh-cn
54 AddLanguage zh-HK .zh-hk
55 AddLanguage zh-TW .zh-tw
56 LanguagePriority en fr de it es ja pl hr da pt pt-pt pt-br fi zh-cn zh-hk zh-tw cs sv sv-se ko no nb ru tr uk eo ar nl hu ro sk el ca en-us en-gb id lt sl bg
61 AddType application/rss+xml .rdf .xml
64 AddEncoding x-gzip .gz
68 ServerAdmin webmaster@debian.org
69 DocumentRoot %TOPDIR%/www/
71 ErrorLog /var/log/apache2/%SITE%-error.log
72 CustomLog /var/log/apache2/%SITE%-access.log combined
74 Alias /cgi-bin/ %TOPDIR%/cgi-bin/
76 PerlModule ModPerl::Registry
78 PerlRequire %TOPDIR%/bin/mod_perl-startup
81 SetHandler perl-script
83 PerlInitHandler Apache2::Reload
85 #PerlInitHandler Apache::Reload
86 PerlHandler ModPerl::Registry
92 BrowserMatch reportbug is_reportbug
95 RewriteLog /var/log/apache2/rewrite.log
98 RewriteMap changelog-url txt:%TOPDIR%/files/changelogs-map
100 RewriteRule ^/cgi-bin/search_packages.pl(.*)$ /search$1
101 RewriteRule ^/cgi-bin/search_contents.pl(.*)$ /search$1
102 RewriteRule ^/unstable/newpkg_([a-z]+)\.[a-z]+\.rdf /unstable/$1/newpkg?format=rss [R=permanent,L]
103 RewriteRule ^/unstable/newpkg_([a-z]+) /unstable/$1/newpkg [R=permanent,L]
105 # we never want to rewrite those URLs
106 RewriteRule ^/cgi-bin/dispatcher.pl - [L]
107 RewriteRule ^/changelogs/ - [L]
108 RewriteRule ^/Pics/ - [L]
109 RewriteRule ^/about/ - [L]
110 RewriteRule ^/[^/]+\.css - [L]
111 RewriteRule ^/[^/]+\.js - [L]
113 # RewriteRule ^/$ http://www.debian.org/distrib/packages
114 RewriteRule ^/$ /index.html [L]
115 RewriteRule ^/([^/+]*)([+])([^/]*)$ "/$1%%{%}2B$3" [N]
116 RewriteRule ^/changelog:(.+)$ http://%SITE%/changelogs/${changelog-url:$1} [R,L,NE]
117 RewriteRule ^/src:([^/]+)$ /source/$1 [R,L,NE]
118 RewriteRule ^/file:(.+)$ http://%SITE%/search?searchon=contents&keywords=$1 [R,L,NE]
120 RewriteCond %{QUERY_STRING} =""
121 RewriteCond %TOPDIR%/www%{REQUEST_FILENAME} -f [OR]
122 RewriteCond %TOPDIR%/www%{REQUEST_FILENAME}.en.html -f [OR]
123 RewriteCond %TOPDIR%/www%{REQUEST_FILENAME} -l [OR]
124 RewriteCond %TOPDIR%/www%{REQUEST_FILENAME} -d
127 RewriteRule ^/(.+)$ /cgi-bin/dispatcher.pl/$1 [L,PT]
129 # In case we need to disable the site again
131 # ErrorDocument 404 /index.html
132 # RewriteCond %{SCRIPT_FILENAME} !^/(sbin|cgi-bin|Pics|test)/
133 # RewriteCond %{SCRIPT_FILENAME} !^/favicon.ico
134 # RewriteCond %{SCRIPT_FILENAME} !^/(stable|testing|unstable|experimental)/
135 # RewriteRule . /index.html