Add Apache-2.4 configuration files (see #571)

This commit is contained in:
Xavier Guimard 2013-05-31 04:54:20 +00:00
parent 11c55bd0a0
commit 9875fb71d4
4 changed files with 210 additions and 1 deletions

View File

@ -0,0 +1,38 @@
#====================================================================
# Apache configuration for LemonLDAP::NG Handler
#====================================================================
# Uncomment this if no previous NameVirtualHost declaration
#NameVirtualHost __VHOSTLISTEN__
# Load LemonLDAP::NG Handler
PerlOptions +GlobalRequest
PerlRequire __HANDLER__
# Common error page and security parameters
ErrorDocument 403 http://auth.__DNSDOMAIN__/?lmError=403
ErrorDocument 500 http://auth.__DNSDOMAIN__/?lmError=500
ErrorDocument 503 http://auth.__DNSDOMAIN__/?lmError=503
<VirtualHost __VHOSTLISTEN__>
ServerName reload.__DNSDOMAIN__
# Configuration reload mechanism (only 1 per physical server is
# needed): choose your URL to avoid restarting Apache when
# configuration change
<Location /reload>
Require all granted
PerlHeaderParserHandler My::Package->refresh
</Location>
# Uncomment this to activate status module
#<Location /status>
# Order deny,allow
# Deny from all
# Allow from 127.0.0.0/8
# PerlHeaderParserHandler My::Package->status
#</Location>
</VirtualHost>

View File

@ -0,0 +1,68 @@
#====================================================================
# Apache configuration for LemonLDAP::NG Manager
#====================================================================
# Uncomment this if no previous NameVirtualHost declaration
#NameVirtualHost __VHOSTLISTEN__
# Manager virtual host (manager.__DNSDOMAIN__)
<VirtualHost __VHOSTLISTEN__>
ServerName manager.__DNSDOMAIN__
# DocumentRoot
DocumentRoot __MANAGERDIR__
<Directory __MANAGERDIR__>
Require all granted
Options +ExecCGI +FollowSymLinks
</Directory>
# On-line documentation
Alias /doc/ __DOCDIR__
Alias /lib/ __DOCDIR__lib/
<Directory __DOCDIR__>
Require all granted
ErrorDocument 404 /notfound.html
Options +FollowSymLinks
</Directory>
# Perl script
# Note: to avoid manager stay in memory, we don't use ModPerl::Registry
# by default. Change this to increase manager performances
<Files *.pl>
SetHandler cgi-script
#SetHandler perl-script
#PerlResponseHandler ModPerl::Registry
</Files>
# Directory index
<IfModule mod_dir.c>
DirectoryIndex index.pl index.html
</IfModule>
<Location />
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript text/css
SetOutputFilter DEFLATE
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
</IfModule>
<IfModule mod_headers.c>
Header append Vary User-Agent env=!dont-vary
</IfModule>
</Location>
<Location /doc/>
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 month"
</IfModule>
</Location>
<Location /skins/>
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 month"
</IfModule>
</Location>
</VirtualHost>

View File

@ -0,0 +1,103 @@
#====================================================================
# Apache configuration for LemonLDAP::NG Portal
#====================================================================
# Uncomment this if no previous NameVirtualHost declaration
#NameVirtualHost __VHOSTLISTEN__
# Portal Virtual Host (auth.__DNSDOMAIN__)
<VirtualHost __VHOSTLISTEN__>
ServerName auth.__DNSDOMAIN__
# DocumentRoot
DocumentRoot __PORTALDIR__
<Directory __PORTALDIR__>
Require all granted
Options +ExecCGI +FollowSymLinks
</Directory>
# Perl script
<Files *.pl>
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
</Files>
<IfModule mod_dir.c>
DirectoryIndex index.pl index.html
</IfModule>
# SOAP functions for sessions management (disabled by default)
<Location /index.pl/adminSessions>
Require all denied
</Location>
# SOAP functions for sessions access (disabled by default)
<Location /index.pl/sessions>
Require all denied
</Location>
# SOAP functions for configuration access (disabled by default)
<Location /index.pl/config>
Require all denied
</Location>
# SOAP functions for notification insertion (disabled by default)
<Location /index.pl/notification>
Require all denied
</Location>
# SAML2 Issuer
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^/saml/metadata /metadata.pl
RewriteRule ^/saml/.* /index.pl
</IfModule>
# CAS Issuer
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^/cas/.* /index.pl
</IfModule>
# OpenID Issuer
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^/openidserver/.* /index.pl
</IfModule>
<Location />
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript text/css
SetOutputFilter DEFLATE
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
</IfModule>
<IfModule mod_headers.c>
Header append Vary User-Agent env=!dont-vary
</IfModule>
</Location>
<Location /skins/>
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 month"
</IfModule>
</Location>
</VirtualHost>
##############################################
## Best performance under ModPerl::Registry ##
##############################################
# Uncomment this to increase performance of Portal:
<Perl>
#require Lemonldap::NG::Portal::SharedConf;
#Lemonldap::NG::Portal::SharedConf->compile(
# qw(delete header cache read_from_client cookie redirect unescapeHTML));
# Uncomment this line if you use Lemonldap::NG menu
#require Lemonldap::NG::Portal::Menu;
# Uncomment this line if you use portal SOAP capabilities
#require SOAP::Lite;
</Perl>

View File

@ -13,5 +13,5 @@ then
[ -e $HANDLERFILE ] || cp $EXAMPLEHANDLERFILE $HANDLERFILE
fi
# Maintainer: #DEBHELPER#
#DEBHELPER#
exit 0