Commit 21d6fa7e authored by Clément Oudot's avatar Clément Oudot

Split test and handler configuration files (#568)

parent 5f0b631e
......@@ -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"
......
......@@ -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
<VirtualHost __VHOSTLISTEN__>
ServerName test1.__DNSDOMAIN__
ServerAlias test2.__DNSDOMAIN__
# SSO protection
PerlHeaderParserHandler My::Package
# DocumentRoot
DocumentRoot __TESTDIR__
<Directory __TESTDIR__>
Order deny,allow
Allow from all
Options +ExecCGI
</Directory>
# Perl script (application test is written in Perl)
<Files *.pl>
SetHandler perl-script
PerlHandler Apache::Registry
</Files>
# Directory index
<IfModule mod_dir.c>
DirectoryIndex index.pl index.html
</IfModule>
</VirtualHost>
<VirtualHost __VHOSTLISTEN__>
ServerName reload.__DNSDOMAIN__
......
......@@ -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
<VirtualHost __VHOSTLISTEN__>
ServerName test1.__DNSDOMAIN__
ServerAlias test2.__DNSDOMAIN__
# SSO protection
PerlHeaderParserHandler My::Package
# DocumentRoot
DocumentRoot __TESTDIR__
<Directory __TESTDIR__>
Order deny,allow
Allow from all
Options +ExecCGI
</Directory>
# Perl script (application test is written in Perl)
<Files *.pl>
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
# Display Menu
PerlOutputFilterHandler Lemonldap::NG::Handler::Menu
</Files>
# Directory index
<IfModule mod_dir.c>
DirectoryIndex index.pl index.html
</IfModule>
</VirtualHost>
<VirtualHost __VHOSTLISTEN__>
ServerName reload.__DNSDOMAIN__
......
#====================================================================
# Apache configuration for LemonLDAP::NG sample applications
#====================================================================
# Uncomment this if no previous NameVirtualHost declaration
#NameVirtualHost __VHOSTLISTEN__
# Sample application
<VirtualHost __VHOSTLISTEN__>
ServerName test1.__DNSDOMAIN__
ServerAlias test2.__DNSDOMAIN__
# SSO protection
PerlHeaderParserHandler My::Package
# DocumentRoot
DocumentRoot __TESTDIR__
<Directory __TESTDIR__>
Order deny,allow
Allow from all
Options +ExecCGI
</Directory>
# Perl script (application test is written in Perl)
<Files *.pl>
SetHandler perl-script
PerlHandler Apache::Registry
</Files>
# Directory index
<IfModule mod_dir.c>
DirectoryIndex index.pl index.html
</IfModule>
</VirtualHost>
#====================================================================
# Apache configuration for LemonLDAP::NG sample applications
#====================================================================
# Uncomment this if no previous NameVirtualHost declaration
#NameVirtualHost __VHOSTLISTEN__
# Sample application
<VirtualHost __VHOSTLISTEN__>
ServerName test1.__DNSDOMAIN__
ServerAlias test2.__DNSDOMAIN__
# SSO protection
PerlHeaderParserHandler My::Package
# DocumentRoot
DocumentRoot __TESTDIR__
<Directory __TESTDIR__>
Order deny,allow
Allow from all
Options +ExecCGI
</Directory>
# Perl script (application test is written in Perl)
<Files *.pl>
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
# Display Menu
PerlOutputFilterHandler Lemonldap::NG::Handler::Menu
</Files>
# Directory index
<IfModule mod_dir.c>
DirectoryIndex index.pl index.html
</IfModule>
</VirtualHost>
......@@ -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:
......
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
......@@ -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
/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
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment