--- dpkg-www-2.47.orig/src/dpkg
+++ dpkg-www-2.47/src/dpkg
@@ -105,6 +105,8 @@
 BGCOLOR="#c0c0c0"
 KEEP_INPUT=0
 DEBUG=0
+DWWW_PATH="/cgi-bin/dwww"
+INFO2WWW_PATH="/cgi-bin/info2www"
 
 # Install buttons support. This require that users define the following
 # mime action in their netscape mailcap file:
@@ -132,7 +134,7 @@
 
 # Select the Manpage to HTML translator
 if [ "$MAN" = dwww ]; then
-       MAN="/cgi-bin/dwww?type=man\\\\&location="
+       MAN="${DWWW_PATH}?type=man\\\\&location="
 fi
 if [ "$MAN" = man2html ]; then
     if [ -x /usr/lib/cgi-bin/man/man2html ]; then
@@ -140,7 +142,7 @@
     elif [ -x /usr/lib/cgi-bin/man2html ]; then
        MAN="/cgi-bin/man2html?"
     else
-       MAN="/cgi-bin/dwww?type=man\\\\&location="
+       MAN="${DWWW_PATH}?type=man\\\\&location="
     fi
 fi
 if [ ! "$MAN" -o "$MAN" = auto ]; then
@@ -149,7 +151,7 @@
     elif [ -x /usr/lib/cgi-bin/man2html ]; then
        MAN="/cgi-bin/man2html?"
     else
-       MAN="/cgi-bin/dwww?type=man\\\\&location="
+       MAN="${DWWW_PATH}?type=man\\\\&location="
     fi
 fi
 
@@ -1091,7 +1093,8 @@
 # Convert a file list to html adding hrefs to files in /usr/{doc,info,man}.
 #
 fileFilter() {
-    awk -v title="$*" -v show_local_files="$SHOW_LOCAL_FILES" -v man="$MAN" '
+    awk -v title="$*" -v show_local_files="$SHOW_LOCAL_FILES" \
+       -v man="$MAN" -v info2www=$INFO2WWW_PATH -v dwww=$DWWW_PATH '
        /\/usr\/(share\/)?([a-zA-Z0-9_+-]+\/)?man\/.*\..*/ {
            if (title) { t = title } else { t = $1 }
            if ($2) { t = t " [" $2 "]"; NF=1 }
@@ -1110,7 +1113,7 @@
            gsub("\\+", "\\+", r);
            gsub("\\+", "%2B", s);
            gsub("\\$","\\$",r)
-           sub(r, "<A HREF=\"/cgi-bin/info2www?" s "\">" t "</A>")
+           sub(r, "<A HREF=\"" info2www "?" s "\">" t "</A>")
            print
            next
        }
@@ -1124,7 +1127,7 @@
            if (show_local_files == "true") {
                sub(r, "<A HREF=\"file:" s "\">" t "</A>")
            } else {
-               sub(r, "<A HREF=\"/cgi-bin/dwww?type=file\\&location=" s "\">"\
+               sub(r, "<A HREF=\"" dwww "?type=file\\&location=" s "\">"\
                       t "</A>")
            }
            print
--- dpkg-www-2.47.orig/src/dpkg-www.conf
+++ dpkg-www-2.47/src/dpkg-www.conf
@@ -42,4 +42,10 @@
 # Enable cgi debugging. Not really useful to normal users.
 # DEBUG=1
 
+# Path on webserver to dwww
+DWWW_PATH="/cgi-bin/dwww"
+
+# Path on webserver to info2www
+INFO2WWW_PATH="/cgi-bin/info2www"
+
 # end of file


