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 frank@lichtenheld.de
70 DocumentRoot %TOPDIR%/www/
72 ErrorLog /var/log/apache2/%SITE%-error.log
73 CustomLog /var/log/apache2/%SITE%-access.log combined
75 ScriptAlias /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 ^/ubuntu/ - [L]
112 RewriteRule ^/[^/]+\.css - [L]
113 RewriteRule ^/[^/]+\.js - [L]
114 RewriteRule ^/favicon.ico$ - [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:([^/]+)$ /source/$1 [R,L,NE]
121 RewriteRule ^/file:(.+)$ http://%SITE%/search?searchon=contents&keywords=$1 [R,L,NE]
123 RewriteCond %{QUERY_STRING} =""
124 RewriteCond %TOPDIR%/www%{REQUEST_FILENAME} -f [OR]
125 RewriteCond %TOPDIR%/www%{REQUEST_FILENAME}.en.html -f [OR]
126 RewriteCond %TOPDIR%/www%{REQUEST_FILENAME} -l
129 RewriteRule ^/(.+)$ /cgi-bin/dispatcher.pl/$1 [L,PT]
131 # In case we need to disable the site again
133 # ErrorDocument 404 /index.html
134 # RewriteCond %{SCRIPT_FILENAME} !^/(sbin|cgi-bin|Pics|test)/
135 # RewriteCond %{SCRIPT_FILENAME} !^/favicon.ico
136 # RewriteCond %{SCRIPT_FILENAME} !^/(stable|testing|unstable|experimental)/
137 # RewriteRule . /index.html
142 ServerAdmin frank@lichtenheld.de
143 DocumentRoot %TOPDIR%/www/
144 ServerName packages.ubuntu.net
145 ServerAlias packages.ubuntulinux.org
146 ErrorLog /var/log/apache2/%SITE%-error.log
147 CustomLog /var/log/apache2/%SITE%-access.log combined
149 ScriptAlias /cgi-bin %TOPDIR%/cgi-bin/
151 RedirectMatch permanent (.*) http://%SITE%$1