]> git.donarmstrong.com Git - debbugs.git/blobdiff - examples/apache.conf
use + for symlinks and multiviews; newer apache doesn't like it otherwise
[debbugs.git] / examples / apache.conf
index 4f9f04c050bdbf86666fe80ae5f844eb207cc28e..479c35098f86a651b39c09c6c19cea27737bc54c 100644 (file)
@@ -1,10 +1,30 @@
 <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
+    DocumentRoot /var/lib/debbugs/www/
+
+    ErrorLog /var/log/apache2/debbugs-error.log
+    CustomLog /var/log/apache2/debbugs-access.log combined
+
+    <Directory />
+        Options FollowSymLinks
+        AllowOverride None
+    </Directory>
+
+    <Directory /var/lib/debbugs/www>
+        Options -Indexes +FollowSymLinks +MultiViews
+        AllowOverride Options
+        Order allow,deny
+        allow from all
+    </Directory>
+
+    ScriptAlias /cgi-bin/ /var/lib/debbugs/www/cgi/
+    <Directory "/var/lib/debbugs/www/cgi/">
+        AllowOverride None
+        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
+        Order allow,deny
+        Allow from all
+    </Directory>
 
     RewriteEngine on
     RewriteCond %{HTTP_USER_AGENT}     .*apt-listbugs.*
     #  RewriteLog /org/bugs.debian.org/apache-rewrite.log
     #  RewriteLogLevel 0
      
-    RewriteRule ^/$ http://www.debian.org/Bugs/
+    #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]
+    RewriteRule ^/[[:space:]]*#?([[:digit:]][[:digit:]][[:digit:]]+)([;&].+)?$ /cgi-bin/bugreport.cgi?bug=$1$2 [L,R,NE]
+    RewriteRule ^/([^/+]*)([+])([^/]*)$ "/$1%%{%}2B$3" [N]
+    RewriteRule ^/[Ff][Rr][Oo][Mm]:([^/]+\@.+)$ /cgi-bin/pkgreport.cgi?submitter=$1 [L,R,NE]
     # 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 ^/([^/]+\@.+)$ /cgi-bin/pkgreport.cgi?maint=$1 [L,R,NE]
+    RewriteRule ^/mbox:([[:digit:]][[:digit:]][[:digit:]]+)([;&].+)?$ /cgi-bin/bugreport.cgi?mbox=yes&bug=$1$2 [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
+    RewriteCond %{REQUEST_URI} ^/(Access\.html|Developer\.html|Reporting\.html|server-request\.html|server-control\.html|server-refcard\.html).* [NC]
+    RewriteRule .* - [L]
+    RewriteRule ^/([0-9]+)$ /cgi-bin/bugreport.cgi?bug=$1 [L,R,NE]
     RewriteRule ^/([^/]+)$ /cgi-bin/pkgreport.cgi?pkg=$1 [L,R,NE]
     <IfModule mod_perl.c>
        <Directory /org/bugs.debian.org/cgi-bin/sql>