From: Frank Lichtenheld Date: Wed, 1 Feb 2006 14:44:35 +0000 (+0000) Subject: Add apache configuration X-Git-Tag: switch-to-templates~225 X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=e3559dded9ba58d4e334ad08781a758231c036a0;p=deb%2Fpackages.git Add apache configuration --- diff --git a/conf/apache.conf b/conf/apache.conf new file mode 100644 index 0000000..febd8d6 --- /dev/null +++ b/conf/apache.conf @@ -0,0 +1,109 @@ +# Need to turn on negotiation_module + + Options +MultiViews +FollowSymLinks +Indexes + AddHandler type-map var + # Make sure that the srm.conf directive is commented out. + AddDefaultCharSet utf-8 + AllowOverride AuthConfig FileInfo + + # Nice caching.. + ExpiresActive On + ExpiresDefault "access plus 1 day" + ExpiresByType image/gif "access plus 1 week" + ExpiresByType image/jpeg "access plus 1 week" + + # language stuff + # you need to keep this in sync with lib/Packages/I18N/Locale.pm + # %lang2charset + AddLanguage en .en + AddLanguage en-us .en-us + AddLanguage en-gb .en-gb + AddLanguage ar .ar + AddLanguage bg .bg + AddLanguage ca .ca + AddLanguage cs .cs + AddCharset ISO-8859-2 .cs + AddLanguage da .da + AddCharset ISO-8859-1 .da + AddLanguage de .de + AddLanguage el .el + AddLanguage eo .eo + AddLanguage es .es + AddCharset ISO-8859-1 .es + AddLanguage fi .fi + AddCharset ISO-8859-1 .fi + AddLanguage fr .fr + AddLanguage hr .hr + AddLanguage hu .hu + AddCharset ISO-8859-2 .hu + AddLanguage id .id + AddLanguage it .it + AddCharset ISO-8859-1 .it + AddLanguage ja .ja + AddCharset EUC_JP .ja + AddLanguage ko .ko + AddLanguage lt .lt + AddLanguage nl .nl + AddCharset ISO-8859-1 .nl + AddLanguage no .no + AddLanguage nb .nb + AddLanguage pl .pl + AddCharset ISO-8859-2 .pl + AddLanguage pt .pt + AddCharset ISO-8859-1 .pt + AddLanguage pt-pt .pt_PT + AddCharset ISO-8859-1 .pt_PT + AddLanguage pt-br .pt_BR + AddCharset ISO-8859-1 .pt_BR + AddLanguage ro .ro + AddLanguage ru .ru + AddLanguage sk .sk + AddCharset ISO-8859-2 .sk + AddLanguage sl .sl + AddLanguage sv .sv_SE + AddCharset ISO-8859-1 .sv_SE + AddLanguage tr .tr + AddLanguage uk .uk + AddCharset KOI8-U .uk + AddLanguage zh-CN .zh-cn + AddLanguage zh-HK .zh-hk + AddLanguage zh-TW .zh-tw + 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 + + DirectoryIndex index index.html index.shtml index.htm + + # RSS stuff + AddType application/rss+xml .rdf .xml + + + + ServerAdmin webmaster@debian.org + DocumentRoot /org/packages.debian.org/www/ + ServerName packages.debian.org + ErrorLog /var/log/apache/packages.debian.org-error.log + CustomLog /var/log/apache/packages.debian.org-access.log combined + + ScriptAlias /cgi-bin /org/packages.debian.org/cgi-bin/ + + RewriteEngine on + + RewriteRule ^/$ http://www.debian.org/distrib/packages + RewriteRule ^/([^/+]*)([+])([^/]*)$ "/$1%%{%}2B$3" [N] + RewriteRule ^/src:([^/]+)$ http://packages.debian.org/cgi-bin/search_packages.pl?searchon=sourcenames&version=all&exact=1&keywords=$1 [R,L,NE] + RewriteRule ^/file:(.+)$ http://packages.debian.org/cgi-bin/search_contents.pl?word=$1&searchmode=searchfiles [R,L,NE] + RewriteRule ^/dirs:(.+)$ http://packages.debian.org/cgi-bin/search_contents.pl?word=$1&searchmode=searchfilesanddirs [R,L,NE] + RewriteRule ^/word:(.+)$ http://packages.debian.org/cgi-bin/search_contents.pl?word=$1&searchmode=searchword [R,L,NE] + RewriteRule ^/list:([^/]+)$ http://packages.debian.org/cgi-bin/search_contents.pl?word=$1&searchmode=filelist [R,L,NE] + RewriteCond %{LA-U:SCRIPT_FILENAME} "!-f" + RewriteCond %{LA-U:SCRIPT_FILENAME} "!-d" + RewriteRule ^/([^/]+)$ http://packages.debian.org/cgi-bin/search_packages.pl?searchon=names&version=all&exact=1&keywords=$1 [R,L,NE] + +# In case we need to disable the site again +# +# ErrorDocument 404 /index.html +# RewriteCond %{SCRIPT_FILENAME} !^/(sbin|cgi-bin|Pics|test)/ +# RewriteCond %{SCRIPT_FILENAME} !^/favicon.ico +# RewriteCond %{SCRIPT_FILENAME} !^/(stable|testing|unstable|experimental)/ +# RewriteRule . /index.html + +