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
83 PerlInitHandler Apache2::Reload
84 PerlHandler ModPerl::Registry
90 BrowserMatch reportbug is_reportbug
93 RewriteLog /var/log/apache2/rewrite.log
96 RewriteMap changelog-url txt:%TOPDIR%/files/changelogs-map
98 RewriteRule ^/cgi-bin/search_packages.pl(.*)$ /search$1
99 RewriteRule ^/cgi-bin/search_contents.pl(.*)$ /search$1
100 RewriteRule ^/unstable/newpkg_([a-z]+)\.[a-z]+\.rdf /unstable/$1/newpkg?format=rss [R=permanent,L]
101 RewriteRule ^/unstable/newpkg_([a-z]+) /unstable/$1/newpkg [R=permanent,L]
103 # we never want to rewrite those URLs
104 RewriteRule ^/cgi-bin/dispatcher.pl - [L]
105 RewriteRule ^/changelogs/ - [L]
106 RewriteRule ^/Pics/ - [L]
107 RewriteRule ^/about/ - [L]
108 RewriteRule ^/ubuntu/ - [L]
109 RewriteRule ^/[^/]+\.css - [L]
110 RewriteRule ^/[^/]+\.js - [L]
111 RewriteRule ^/favicon.ico$ - [L]
112 RewriteRule ^/robots.txt$ - [L]
114 # RewriteRule ^/$ http://www.debian.org/distrib/packages
115 RewriteRule ^/$ /index.html [L]
116 RewriteRule ^/([^/+]*)([+])([^/]*)$ "/$1%%{%}2B$3" [N]
117 RewriteRule ^/changelog:(.+)$ /changelogs/${changelog-url:$1} [R,L,NE]
118 RewriteRule ^/src:([^/]+)$ /search?searchon=sourcenames&keywords=$1 [R,L,NE]
119 RewriteRule ^/file:(.+)$ /search?searchon=contents&keywords=$1 [R,L,NE]
120 RewriteCond %{QUERY_STRING} ^$ [OR]
121 RewriteCond %{REQUEST_URI} !^/search$
122 RewriteCond %{REQUEST_URI} !^/cgi-bin/search_(contents|packages)\.pl$
123 RewriteRule ^/([^/]+)$ /search?keywords=$1 [R,L,NE]
125 RewriteCond %{QUERY_STRING} =""
126 RewriteCond %TOPDIR%/www%{REQUEST_FILENAME} -f [OR]
127 RewriteCond %TOPDIR%/www%{REQUEST_FILENAME}.en.html -f [OR]
128 RewriteCond %TOPDIR%/www%{REQUEST_FILENAME} -l
131 RewriteRule ^/(.+)$ /cgi-bin/dispatcher.pl/$1 [L,PT]
133 # In case we need to disable the site again
135 # ErrorDocument 404 /index.html
136 # RewriteCond %{SCRIPT_FILENAME} !^/(sbin|cgi-bin|Pics|test)/
137 # RewriteCond %{SCRIPT_FILENAME} !^/favicon.ico
138 # RewriteCond %{SCRIPT_FILENAME} !^/(stable|testing|unstable|experimental)/
139 # RewriteRule . /index.html
144 ServerAdmin frank@lichtenheld.de
145 DocumentRoot %TOPDIR%/www/
146 ServerName packages.ubuntu.net
147 ServerAlias packages.ubuntulinux.org
148 ErrorLog /var/log/apache2/%SITE%-error.log
149 CustomLog /var/log/apache2/%SITE%-access.log combined
151 ScriptAlias /cgi-bin %TOPDIR%/cgi-bin/
153 RedirectMatch permanent (.*) http://%SITE%$1