diff -Nru dhelp-0.6.21+nmu2/config/apache-dhelp-2.2.conf dhelp-0.6.21+nmu3/config/apache-dhelp-2.2.conf
--- dhelp-0.6.21+nmu2/config/apache-dhelp-2.2.conf	1970-01-01 01:00:00.000000000 +0100
+++ dhelp-0.6.21+nmu3/config/apache-dhelp-2.2.conf	2013-09-22 10:57:30.000000000 +0100
@@ -0,0 +1,53 @@
+# This config file is for Apache version 2.2.x and is installed
+# into /etc/apache2/conf.d.  It is ignored by Apache version 2.4.x;
+# that has its own configuration file available in
+# /etc/apache2/conf-available
+<Location ~ /cgi-bin/d(search|help_fetcher)(\?.*)?>
+  order deny,allow
+  deny from all
+  allow from localhost
+  Options -Indexes -MultiViews
+</Location>
+
+<Directory /usr/share/doc>
+  order deny,allow
+  deny from all
+  allow from localhost
+  Options Indexes MultiViews FollowSymLinks
+</Directory>
+
+# The following directives are needed for the operation of Debian Online Help
+# and are assumed to already be enabled on the server's configuration:
+#
+#Alias /doc /usr/share/doc
+#
+#ScriptAlias /cgi-bin /usr/lib/cgi-bin
+#<Directory /usr/lib/cgi-bin>
+#  AllowOverride None
+#  Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
+#  order allow,deny
+#  allow from all
+#</Directory>
+#
+# Note that enabling /doc/ alias may result in a security vulnerability,
+# specifically CVE-2012-0216. Thus newer versions of the apache2 package
+# do NOT have the /doc/ alias enabled by default. 
+#
+# See http://www.debian.org/security/2012/dsa-2452 for reference and to
+# decide whether the conditions stated there apply to your case.
+#
+# Then, enable the /doc/ alias by uncommenting the line above, if you judge
+# that it is secure to do so. Else you can uncomment the following two lines
+# to allow a secure partial operation of Debian Online Help, even if the
+# above vulnerability is present:
+#
+#Alias /doc/HTML /usr/share/doc/HTML
+#Alias /doc/dhelp/css /usr/share/doc/dhelp/css
+#
+# Using the above two alias you will be able to see descriptions and search
+# for terms, but the documents themselves will be inaccessible. You will need
+# to manually add an alias directive *for each document* that you want it to
+# become accessible.
+#
+# See also /usr/share/doc/dhelp/README.Debian for more information.
+
diff -Nru dhelp-0.6.21+nmu2/config/apache-dhelp.conf dhelp-0.6.21+nmu3/config/apache-dhelp.conf
--- dhelp-0.6.21+nmu2/config/apache-dhelp.conf	2012-06-12 19:59:55.000000000 +0100
+++ dhelp-0.6.21+nmu3/config/apache-dhelp.conf	2013-09-22 11:00:01.000000000 +0100
@@ -1,14 +1,14 @@
+# This config file is for Apache version 2.4.x and is installed
+# into /etc/apache2/conf-available.  It is ignored by Apache version 2.2.x;
+# that has its own configuration file available in
+# /etc/apache2/conf.d
 <Location ~ /cgi-bin/d(search|help_fetcher)(\?.*)?>
-  order deny,allow
-  deny from all
-  allow from localhost
+  Require local
   Options -Indexes -MultiViews
 </Location>
 
 <Directory /usr/share/doc>
-  order deny,allow
-  deny from all
-  allow from localhost
+  Require local
   Options Indexes MultiViews FollowSymLinks
 </Directory>
 
@@ -27,7 +27,7 @@
 # Note that enabling /doc/ alias may result in a security vulnerability,
 # specifically CVE-2012-0216. Thus newer versions of the apache2 package
 # do NOT have the /doc/ alias enabled by default. 
-#
+# 
 # See http://www.debian.org/security/2012/dsa-2452 for reference and to
 # decide whether the conditions stated there apply to your case.
 #
diff -Nru dhelp-0.6.21+nmu2/debian/changelog dhelp-0.6.21+nmu3/debian/changelog
--- dhelp-0.6.21+nmu2/debian/changelog	2013-05-17 16:58:27.000000000 +0100
+++ dhelp-0.6.21+nmu3/debian/changelog	2013-09-22 11:07:33.000000000 +0100
@@ -1,3 +1,13 @@
+dhelp (0.6.21+nmu3) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Fix apache2 2.4 issues: install different config files into
+    /etc/apache2/conf.d and /etc/apache2/conf-available (for versions 2.2
+    and 2.4 respectively), and call apache2-maintscript-helper with
+    correct parameters (Closes: #718588)
+
+ -- Julian Gilbey <jdg@debian.org>  Sun, 22 Sep 2013 11:07:22 +0100
+
 dhelp (0.6.21+nmu2) unstable; urgency=low
 
   * Non-maintainer upload.
diff -Nru dhelp-0.6.21+nmu2/debian/postinst dhelp-0.6.21+nmu3/debian/postinst
--- dhelp-0.6.21+nmu2/debian/postinst	2012-06-14 20:28:01.000000000 +0100
+++ dhelp-0.6.21+nmu3/debian/postinst	2013-09-22 10:40:57.000000000 +0100
@@ -165,8 +165,8 @@
 
     # Try to enable web server configs (at most one is expected to succeed)
 
-    try_chconf_apache2  "enable" dhelp || true
-    try_chconf_lighttpd "enable" dhelp || true
+    try_chconf_apache2  "$1" "enable" dhelp || true
+    try_chconf_lighttpd "$1" "enable" dhelp || true
 
     # Create the full text search index at the end of postinst.
 
diff -Nru dhelp-0.6.21+nmu2/debian/prerm dhelp-0.6.21+nmu3/debian/prerm
--- dhelp-0.6.21+nmu2/debian/prerm	2012-06-14 20:28:01.000000000 +0100
+++ dhelp-0.6.21+nmu3/debian/prerm	2013-09-22 10:42:24.000000000 +0100
@@ -88,8 +88,8 @@
 *)
     # Disable our web server configuration snippets.
 
-    try_chconf_apache2  "disable" dhelp || true
-    try_chconf_lighttpd "disable" dhelp || true
+    try_chconf_apache2  "$1" "disable" dhelp || true
+    try_chconf_lighttpd "$1" "disable" dhelp || true
 
     # Cleanup the files installed by the postinst.
 
diff -Nru dhelp-0.6.21+nmu2/debian/scripts/httpd.sh dhelp-0.6.21+nmu3/debian/scripts/httpd.sh
--- dhelp-0.6.21+nmu2/debian/scripts/httpd.sh	2012-06-12 19:59:55.000000000 +0100
+++ dhelp-0.6.21+nmu3/debian/scripts/httpd.sh	2013-09-22 11:20:35.000000000 +0100
@@ -131,13 +131,14 @@
 # Try to (en/dis)able an apache2 configuration snippet.
 # Return error if (en/dis)abling tried and failed; caller *must* check status.
 # ARGS:
-# $1={enable,disable} $2=package [$3=name_of_snippet_if_different_from_package]
+# $1=maintscript-action (configure,abort-upgrade)
+# $2={enable,disable} $3=package [$4=name_of_snippet_if_different_from_package]
 #
 try_chconf_apache2 ()
 {
-    local action=${1}
-    local package=${2}
-    local confname=${3}
+    local action=${2}
+    local package=${3}
+    local confname=${4}
 
     local ret=0
     _check_action_and_package ${action} ${package} "try_chconf_apache2" \
@@ -148,9 +149,9 @@
 
     local confaction
     if [ "${action}" = "enable" ]; then
-        confaction=enmod
+        confaction=enconf
     else
-        confaction=dismod
+        confaction=disconf
     fi
 
     if [ "X${confname}" = "X" ]; then
@@ -201,13 +202,14 @@
 # Try to (en/dis)able a lighttpd configuration snippet.
 # Return error if (en/dis)abling tried and failed; caller *must* check status.
 # ARGS:
-# $1={enable,disable} $2=package [$3=name_of_snippet_if_different_from_package]
+# $1=maintscript-action (configure,abort-upgrade)
+# $2={enable,disable} $3=package [$4=name_of_snippet_if_different_from_package]
 #
 try_chconf_lighttpd ()
 {
-    local action=${1}
-    local package=${2}
-    local confname=${3}
+    local action=${2}
+    local package=${3}
+    local snippetname=${4}
 
     local ret=0
     _check_action_and_package ${action} ${package} "try_chconf_lighttpd" \
@@ -229,8 +231,8 @@
 
     local confname=${package}
 
-    if [ "X${2}" != "X" ]; then
-        confname=${2}
+    if [ "X${snippetname}" != "X" ]; then
+        confname=${snippetname}
     fi
 
     # lighty-xxx-mod will return 2 if no action is needed; workaround this.
diff -Nru dhelp-0.6.21+nmu2/Makefile dhelp-0.6.21+nmu3/Makefile
--- dhelp-0.6.21+nmu2/Makefile	2012-06-14 20:28:01.000000000 +0100
+++ dhelp-0.6.21+nmu3/Makefile	2013-09-22 11:03:54.000000000 +0100
@@ -1,6 +1,6 @@
 # Makefile for dhelp project
 
-# Copyright (C) 2005 Esteban Manchado Vel�zquez <zoso@debian.org>
+# Copyright (C) 2005 Esteban Manchado Velázquez <zoso@debian.org>
 # Copyright (C) 2012 Georgios M. Zarkadas <gz@member.fsf.org>
 
 # This file is free software; you can redistribute it and/or modify it
@@ -94,7 +94,7 @@
 ## Our and web servers configuration under /etc
 install-conf:
 	install -D --mode=644 config/dhelp.conf-sample $(confdir)/dhelp.conf
-	install -D --mode=644 config/apache-dhelp.conf $(confdir)/apache2/conf.d/dhelp.conf
+	install -D --mode=644 config/apache-dhelp-2.2.conf $(confdir)/apache2/conf.d/dhelp.conf
 	install -D --mode=644 config/apache-dhelp.conf $(confdir)/apache2/conf-available/dhelp.conf
 	install -D --mode=644 config/lighttpd-dhelp.conf $(confdir)/lighttpd/conf-available/95-dhelp.conf
 
