]> git.donarmstrong.com Git - debbugs.git/blob - examples/apache.conf
Use PT|passthrough redirects for ^/([0-9]+)$ for bugreport.cgi & ^/([^/]+)$ for pkgre...
[debbugs.git] / examples / apache.conf
1 # -*- mode: apache; -*-
2 <VirtualHost *>
3     ServerName bugs.debian.org
4     ServerAdmin owner@bugs.debian.org
5     DocumentRoot /var/lib/debbugs/www/
6
7     ErrorLog /var/log/apache2/debbugs-error.log
8     CustomLog /var/log/apache2/debbugs-access.log combined
9
10     <Directory /var/lib/debbugs/www>
11             Options Indexes SymLinksIfOwnerMatch MultiViews
12             DirectoryIndex index.en.html
13             Require all granted
14     </Directory>
15
16     ScriptAlias /cgi-bin/ /var/lib/debbugs/www/cgi/
17     <Directory "/var/lib/debbugs/www/cgi/">
18         AllowOverride None
19         Options ExecCGI SymLinksIfOwnerMatch
20             Require all granted
21     </Directory>
22
23     RewriteEngine on
24     RewriteCond %{HTTP_USER_AGENT}      .*apt-listbugs.*
25     RewriteRule .*                      /apt-listbugs.html [R,L]
26
27     #  RewriteLog /org/bugs.debian.org/apache-rewrite.log
28     #  RewriteLogLevel 0
29      
30     #RewriteRule ^/$ http://www.debian.org/Bugs/
31     RewriteRule ^/(robots\.txt|release-critical|apt-listbugs\.html)$ - [L]
32     # The following two redirect to up-to-date pages
33     RewriteRule ^/[[:space:]]*#?([[:digit:]][[:digit:]][[:digit:]]+)([;&].+)?$ /cgi-bin/bugreport.cgi?bug=$1$2 [L,R,NE]
34     RewriteRule ^/([^/+]*)([+])([^/]*)$ "/$1%%{%}2B$3" [N]
35     RewriteRule ^/[Ff][Rr][Oo][Mm]:([^/]+\@.+)$ /cgi-bin/pkgreport.cgi?submitter=$1 [L,R,NE]
36     # Commented out, 'cuz aj says it will crash master. (old master)
37     # RewriteRule ^/[Ss][Ee][Vv][Ee][Rr][Ii][Tt][Yy]:([^/]+\@.+)$ /cgi-bin/pkgreport.cgi?severity=$1 [L,R]
38     RewriteRule ^/([^/]+\@.+)$ /cgi-bin/pkgreport.cgi?maint=$1 [L,R,NE]
39     RewriteRule ^/mbox:([[:digit:]][[:digit:]][[:digit:]]+)([;&].+)?$ /cgi-bin/bugreport.cgi?mbox=yes&bug=$1$2 [L,R,NE]
40     RewriteRule ^/src:([^/]+)$ /cgi-bin/pkgreport.cgi?src=$1 [L,R,NE]
41     RewriteRule ^/severity:([^/]+)$ /cgi-bin/pkgreport.cgi?severity=$1 [L,R,NE]
42     RewriteRule ^/tag:([^/]+)$ /cgi-bin/pkgreport.cgi?tag=$1 [L,R,NE]
43     # RewriteMap fix-chars      int:noescape
44     RewriteCond %{REQUEST_URI} ^/(Access\.html|Developer\.html|Reporting\.html|server-request\.html|server-control\.html|server-refcard\.html).* [NC]
45     RewriteRule .* - [L]
46     # PT|passthrough to bugreport.cgi and pkgreport.cgi
47     RewriteRule ^/([0-9]+)$ /cgi-bin/bugreport.cgi?bug=$1 [PT,NE]
48     RewriteRule ^/([^/]+)$ /cgi-bin/pkgreport.cgi?pkg=$1 [PT,NE]
49 </VirtualHost>