diff --git a/Makefile b/Makefile
index c9d0ff3e1..4c5470950 100644
--- a/Makefile
+++ b/Makefile
@@ -248,6 +248,7 @@ install_site: install_manager_site install_portal_site install_handler_site inst
cp --remove-destination _example/etc/portal-apache$(APACHEVERSION).conf $(RCONFDIR); \
cp --remove-destination _example/etc/handler-apache$(APACHEVERSION).conf $(RCONFDIR); \
cp --remove-destination _example/etc/manager-apache$(APACHEVERSION).conf $(RCONFDIR); \
+ cp --remove-destination _example/etc/test-apache$(APACHEVERSION).conf $(RCONFDIR); \
cp --remove-destination _example/etc/for_etc_hosts $(RCONFDIR); \
fi
@$(PERL) -i -pe 's#__HANDLER__#${HANDLERDIR}/MyHandler.pm#; \
@@ -271,6 +272,7 @@ install_site: install_manager_site install_portal_site install_handler_site inst
@echo " include ${CONFDIR}/portal-apache$(APACHEVERSION).conf"
@echo " include ${CONFDIR}/handler-apache$(APACHEVERSION).conf"
@echo " include ${CONFDIR}/manager-apache$(APACHEVERSION).conf"
+ @echo " include ${CONFDIR}/test-apache$(APACHEVERSION).conf"
@echo
@echo "2 - Restart Apache:"
@echo " apache$(APACHEVERSION)ctl restart"
diff --git a/_example/etc/handler-apache.conf b/_example/etc/handler-apache.conf
index cee37dc28..98b833da0 100644
--- a/_example/etc/handler-apache.conf
+++ b/_example/etc/handler-apache.conf
@@ -13,35 +13,6 @@ ErrorDocument 403 http://auth.__DNSDOMAIN__/?lmError=403
ErrorDocument 500 http://auth.__DNSDOMAIN__/?lmError=500
ErrorDocument 503 http://auth.__DNSDOMAIN__/?lmError=503
-# Sample application
-
- ServerName test1.__DNSDOMAIN__
- ServerAlias test2.__DNSDOMAIN__
-
- # SSO protection
- PerlHeaderParserHandler My::Package
-
- # DocumentRoot
- DocumentRoot __TESTDIR__
-
- Order deny,allow
- Allow from all
- Options +ExecCGI
-
-
- # Perl script (application test is written in Perl)
-
- SetHandler perl-script
- PerlHandler Apache::Registry
-
-
- # Directory index
-
- DirectoryIndex index.pl index.html
-
-
-
-
ServerName reload.__DNSDOMAIN__
diff --git a/_example/etc/handler-apache2.conf b/_example/etc/handler-apache2.conf
index d69f4b8d0..67e3421b9 100644
--- a/_example/etc/handler-apache2.conf
+++ b/_example/etc/handler-apache2.conf
@@ -14,39 +14,6 @@ ErrorDocument 403 http://auth.__DNSDOMAIN__/?lmError=403
ErrorDocument 500 http://auth.__DNSDOMAIN__/?lmError=500
ErrorDocument 503 http://auth.__DNSDOMAIN__/?lmError=503
-# Sample application
-
- ServerName test1.__DNSDOMAIN__
- ServerAlias test2.__DNSDOMAIN__
-
- # SSO protection
- PerlHeaderParserHandler My::Package
-
- # DocumentRoot
- DocumentRoot __TESTDIR__
-
- Order deny,allow
- Allow from all
- Options +ExecCGI
-
-
- # Perl script (application test is written in Perl)
-
- SetHandler perl-script
- PerlResponseHandler ModPerl::Registry
-
- # Display Menu
- PerlOutputFilterHandler Lemonldap::NG::Handler::Menu
-
-
-
- # Directory index
-
- DirectoryIndex index.pl index.html
-
-
-
-
ServerName reload.__DNSDOMAIN__
diff --git a/_example/etc/test-apache.conf b/_example/etc/test-apache.conf
new file mode 100644
index 000000000..e63361d60
--- /dev/null
+++ b/_example/etc/test-apache.conf
@@ -0,0 +1,36 @@
+#====================================================================
+# Apache configuration for LemonLDAP::NG sample applications
+#====================================================================
+
+# Uncomment this if no previous NameVirtualHost declaration
+#NameVirtualHost __VHOSTLISTEN__
+
+# Sample application
+
+ ServerName test1.__DNSDOMAIN__
+ ServerAlias test2.__DNSDOMAIN__
+
+ # SSO protection
+ PerlHeaderParserHandler My::Package
+
+ # DocumentRoot
+ DocumentRoot __TESTDIR__
+
+ Order deny,allow
+ Allow from all
+ Options +ExecCGI
+
+
+ # Perl script (application test is written in Perl)
+
+ SetHandler perl-script
+ PerlHandler Apache::Registry
+
+
+ # Directory index
+
+ DirectoryIndex index.pl index.html
+
+
+
+
diff --git a/_example/etc/test-apache2.conf b/_example/etc/test-apache2.conf
new file mode 100644
index 000000000..f575c213e
--- /dev/null
+++ b/_example/etc/test-apache2.conf
@@ -0,0 +1,40 @@
+#====================================================================
+# Apache configuration for LemonLDAP::NG sample applications
+#====================================================================
+
+# Uncomment this if no previous NameVirtualHost declaration
+#NameVirtualHost __VHOSTLISTEN__
+
+# Sample application
+
+ ServerName test1.__DNSDOMAIN__
+ ServerAlias test2.__DNSDOMAIN__
+
+ # SSO protection
+ PerlHeaderParserHandler My::Package
+
+ # DocumentRoot
+ DocumentRoot __TESTDIR__
+
+ Order deny,allow
+ Allow from all
+ Options +ExecCGI
+
+
+ # Perl script (application test is written in Perl)
+
+ SetHandler perl-script
+ PerlResponseHandler ModPerl::Registry
+
+ # Display Menu
+ PerlOutputFilterHandler Lemonldap::NG::Handler::Menu
+
+
+
+ # Directory index
+
+ DirectoryIndex index.pl index.html
+
+
+
+
diff --git a/debian/README.Debian b/debian/README.Debian
index b22add103..9514d348c 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -17,6 +17,7 @@ Enable the components you've installed:
a2ensite handler-apache2.conf
a2ensite portal-apache2.conf
a2ensite manager-apache2.conf
+ a2ensite test-apache2.conf
and enable mod_perl if not already loaded:
diff --git a/debian/liblemonldap-ng-handler-perl.examples b/debian/liblemonldap-ng-handler-perl.examples
index f9ab48f0b..cd7f90c86 100644
--- a/debian/liblemonldap-ng-handler-perl.examples
+++ b/debian/liblemonldap-ng-handler-perl.examples
@@ -1,3 +1,4 @@
debian/tmp/examples/handler/*
debian/tmp/etc/lemonldap-ng/handler-apache2.conf
+debian/tmp/etc/lemonldap-ng/test-apache2.conf
debian/tmp/var/lib/lemonldap-ng/test
diff --git a/debian/liblemonldap-ng-handler-perl.install b/debian/liblemonldap-ng-handler-perl.install
index fe2af4e38..1d2182282 100644
--- a/debian/liblemonldap-ng-handler-perl.install
+++ b/debian/liblemonldap-ng-handler-perl.install
@@ -4,3 +4,4 @@
/var/lib/lemonldap-ng/test
/usr/share/lemonldap-ng/bin/purgeLocalCache
/etc/lemonldap-ng/handler-apache2.conf
+/etc/lemonldap-ng/test-apache2.conf
diff --git a/debian/liblemonldap-ng-handler-perl.links b/debian/liblemonldap-ng-handler-perl.links
index 1a82bc8d8..cc5875bfc 100644
--- a/debian/liblemonldap-ng-handler-perl.links
+++ b/debian/liblemonldap-ng-handler-perl.links
@@ -1,2 +1,3 @@
/etc/lemonldap-ng/handler-apache2.conf /etc/apache2/sites-available/handler-apache2.conf
+/etc/lemonldap-ng/test-apache2.conf /etc/apache2/sites-available/test-apache2.conf
diff --git a/rpm/lemonldap-ng.spec b/rpm/lemonldap-ng.spec
index b147bc6c3..fb17e2df9 100644
--- a/rpm/lemonldap-ng.spec
+++ b/rpm/lemonldap-ng.spec
@@ -375,6 +375,9 @@ fi
if [ ! -e %{apache_confdir}/z-lemonldap-ng-portal.conf ] ; then
ln -s %{lm_confdir}/portal-apache2.conf %{apache_confdir}/z-lemonldap-ng-portal.conf || :
fi
+if [ ! -e %{apache_confdir}/z-lemonldap-ng-test.conf ] ; then
+ ln -s %{lm_confdir}/test-apache2.conf %{apache_confdir}/z-lemonldap-ng-test.conf || :
+fi
# Upgrade from previous version
# See http://lemonldap-ng.org/documentation/1.0/upgrade
if [ $1 -gt 1 ] ; then
@@ -401,6 +404,7 @@ if [ $1 -eq 0 ] ; then
rm -f %{apache_confdir}/z-lemonldap-ng-handler.conf 2>&1 > /dev/null || :
rm -f %{apache_confdir}/z-lemonldap-ng-manager.conf 2>&1 > /dev/null || :
rm -f %{apache_confdir}/z-lemonldap-ng-portal.conf 2>&1 > /dev/null || :
+ rm -f %{apache_confdir}/z-lemonldap-ng-test.conf 2>&1 > /dev/null || :
fi
# Upgrade from previous version
if [ $1 -eq 1 ] ; then
@@ -423,9 +427,11 @@ rm -rf %{buildroot}
%config(noreplace) %{lm_confdir}/handler-apache2.conf
%config(noreplace) %{lm_confdir}/manager-apache2.conf
%config(noreplace) %{lm_confdir}/portal-apache2.conf
+%config(noreplace) %{lm_confdir}/test-apache2.conf
%ghost %{apache_confdir}/z-lemonldap-ng-handler.conf
%ghost %{apache_confdir}/z-lemonldap-ng-manager.conf
%ghost %{apache_confdir}/z-lemonldap-ng-portal.conf
+%ghost %{apache_confdir}/z-lemonldap-ng-test.conf
%dir %{lm_vardir}
%dir %{lm_sharedir}
%dir %{lm_sharedir}/bin