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 "modification plus 1 year"
13 ExpiresByType image/jpeg "modification plus 1 year"
14 ExpiresByType image/png "modification plus 1 year"
17 # you need to keep this in sync with lib/Packages/I18N/Locale.pm
20 AddLanguage en-us .en-us
21 AddLanguage en-gb .en-gb
45 AddLanguage pt-pt .pt_PT
46 AddLanguage pt-br .pt_BR
54 AddLanguage zh-CN .zh-cn
55 AddLanguage zh-HK .zh-hk
56 AddLanguage zh-TW .zh-tw
57 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
62 AddType application/rss+xml .rdf .xml
65 AddEncoding x-gzip .gz
69 ServerAdmin webmaster@debian.org
70 DocumentRoot %TOPDIR%/www/
72 ErrorLog /var/log/apache2/%SITE%-error.log
73 CustomLog /var/log/apache2/%SITE%-access.log combined
75 Alias /cgi-bin/ %TOPDIR%/cgi-bin/
77 PerlModule ModPerl::Registry
79 PerlRequire %TOPDIR%/bin/mod_perl-startup
82 SetHandler perl-script
84 PerlInitHandler Apache2::Reload
86 #PerlInitHandler Apache::Reload
87 PerlHandler ModPerl::Registry
93 BrowserMatch reportbug is_reportbug
96 RewriteLog /var/log/apache2/rewrite.log
99 RewriteMap changelog-url txt:%TOPDIR%/files/changelogs-map
101 RewriteRule ^/cgi-bin/search_packages.pl(.*)$ /search$1
102 RewriteRule ^/cgi-bin/search_contents.pl(.*)$ /search$1
103 RewriteRule ^/unstable/newpkg_([a-z]+)\.[a-z]+\.rdf /unstable/$1/newpkg?format=rss [R=permanent,L]
104 RewriteRule ^/unstable/newpkg_([a-z]+) /unstable/$1/newpkg [R=permanent,L]
106 # we never want to rewrite those URLs
107 RewriteRule ^/cgi-bin/dispatcher.pl - [L]
108 RewriteRule ^/changelogs/ - [L]
109 RewriteRule ^/Pics/ - [L]
110 RewriteRule ^/about/ - [L]
111 RewriteRule ^/[^/]+\.css - [L]
112 RewriteRule ^/[^/]+\.js - [L]
113 RewriteRule ^/favicon.ico$ - [L]
114 RewriteRule ^/robots.txt$ - [L]
116 # RewriteRule ^/$ http://www.debian.org/distrib/packages
117 RewriteRule ^/$ /index.html [L]
118 RewriteRule ^/([^/+]*)([+])([^/]*)$ "/$1%%{%}2B$3" [N]
119 RewriteRule ^/changelog:(.+)$ http://%SITE%/changelogs/${changelog-url:$1} [R,L,NE]
120 RewriteRule ^/src:([^/]+)$ http://%SITE%/search?searchon=sourcenames&keywords=$1 [R,L,NE]
121 RewriteRule ^/file:(.+)$ http://%SITE%/search?searchon=contents&keywords=$1 [R,L,NE]
122 RewriteCond %{REQUEST_URI} !^/search$ [OR]
123 RewriteCond %{QUERY_STRING} ^$
124 RewriteRule ^/([^/]+)$ http://%SITE%/search?keywords=$1 [R,L,NE]
126 RewriteCond %{QUERY_STRING} =""
127 RewriteCond %TOPDIR%/www%{REQUEST_FILENAME} -f [OR]
128 RewriteCond %TOPDIR%/www%{REQUEST_FILENAME}.en.html -f [OR]
129 RewriteCond %TOPDIR%/www%{REQUEST_FILENAME} -l
132 RewriteRule ^/(.+)$ /cgi-bin/dispatcher.pl/$1 [L,PT]
134 # In case we need to disable the site again
136 # ErrorDocument 404 /index.html
137 # RewriteCond %{SCRIPT_FILENAME} !^/(sbin|cgi-bin|Pics|test)/
138 # RewriteCond %{SCRIPT_FILENAME} !^/favicon.ico
139 # RewriteCond %{SCRIPT_FILENAME} !^/(stable|testing|unstable|experimental)/
140 # RewriteRule . /index.html