]> git.donarmstrong.com Git - debbugs.git/commitdiff
[project @ 2005-07-14 16:21:50 by don]
authordon <>
Thu, 14 Jul 2005 23:21:50 +0000 (15:21 -0800)
committerdon <>
Thu, 14 Jul 2005 23:21:50 +0000 (15:21 -0800)
* Added apache.conf, which is a sample apache configuration file which
   implements the rewrite rules that are currently used on bugs.debian.org.
   [When commited this will enable #222264 to be closed]

examples/apache.conf [new file with mode: 0644]

diff --git a/examples/apache.conf b/examples/apache.conf
new file mode 100644 (file)
index 0000000..4f9f04c
--- /dev/null
@@ -0,0 +1,38 @@
+<VirtualHost *>
+    ServerName bugs.debian.org
+    ServerAdmin owner@bugs.debian.org
+    DocumentRoot /org/bugs.debian.org/www/
+    ScriptAlias /cgi-bin /org/bugs.debian.org/cgi-bin
+    ErrorLog /var/log/apache/bugs.debian.org-error.log
+    CustomLog /var/log/apache/bugs.debian.org-access.log combined
+
+    RewriteEngine on
+    RewriteCond %{HTTP_USER_AGENT}     .*apt-listbugs.*
+    RewriteRule .*                     /apt-listbugs.html [R,L]
+
+    #  RewriteLog /org/bugs.debian.org/apache-rewrite.log
+    #  RewriteLogLevel 0
+     
+    RewriteRule ^/$ http://www.debian.org/Bugs/
+    RewriteRule ^/(robots\.txt|release-critical|apt-listbugs\.html)$ - [L]
+    # The following two redirect to up-to-date pages
+    RewriteRule ^/([[:digit:]][[:digit:]][[:digit:]]+)$ /cgi-bin/bugreport.cgi?bug=$1 [L,R]
+    RewriteRule ^/[Ff][Rr][Oo][Mm]:([^/]+\@.+)$ /cgi-bin/pkgreport.cgi?submitter=$1 [L,R]
+    # Commented out, 'cuz aj says it will crash master. (old master)
+    # RewriteRule ^/[Ss][Ee][Vv][Ee][Rr][Ii][Tt][Yy]:([^/]+\@.+)$ /cgi-bin/pkgreport.cgi?severity=$1 [L,R]
+    RewriteRule ^/([^/]+\@.+)$ /cgi-bin/pkgreport.cgi?maint=$1 [L,R]
+    RewriteRule ^/([^/+]*)([+])([^/]*)$ "/$1%%{%}2B$3" [N]
+    RewriteRule ^/mbox:([[:digit:]][[:digit:]][[:digit:]]+)$ /cgi-bin/bugreport.cgi?mbox=yes&bug=$1 [L,R,NE]
+    RewriteRule ^/src:([^/]+)$ /cgi-bin/pkgreport.cgi?src=$1 [L,R,NE]
+    RewriteRule ^/severity:([^/]+)$ /cgi-bin/pkgreport.cgi?severity=$1 [L,R,NE]
+    RewriteRule ^/tag:([^/]+)$ /cgi-bin/pkgreport.cgi?tag=$1 [L,R,NE]
+    # RewriteMap fix-chars     int:noescape
+    RewriteRule ^/([^/]+)$ /cgi-bin/pkgreport.cgi?pkg=$1 [L,R,NE]
+    <IfModule mod_perl.c>
+       <Directory /org/bugs.debian.org/cgi-bin/sql>
+           SetHandler  perl-script
+           PerlHandler Apache::Registry
+           Options +ExecCGI
+       </Directory>
+    </IfModule>
+</VirtualHost>