#====================================================================
# Apache configuration for LemonLDAP::NG Portal
#====================================================================
# Uncomment this if no previous NameVirtualHost declaration
#NameVirtualHost "*:80"
# Portal Virtual Host (auth.example.com)
ServerName %%authWebName
# DocumentRoot
DocumentRoot /var/lib/lemonldap-ng/portal/
= 2.3>
Require all granted
Order Deny,Allow
Allow from all
Options +ExecCGI +FollowSymLinks
SSLEngine on
SSLCertificateFile %%apache_cert
SSLCertificateKeyFile %%server_key
SSLProtocol all -SSLv3 -SSLv2
# Perl script
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
#CGIPassAuth on
DirectoryIndex index.pl index.html
# SOAP functions for sessions management (disabled by default)
= 2.3>
Require all denied
Order Deny,Allow
Deny from all
# SOAP functions for sessions access (disabled by default)
= 2.3>
Require all denied
Order Deny,Allow
Deny from all
# SOAP functions for configuration access (disabled by default)
= 2.3>
Require all denied
Order Deny,Allow
Deny from all
# SOAP functions for notification insertion (disabled by default)
= 2.3>
Require all denied
Order Deny,Allow
Deny from all
# SAML2 Issuer
RewriteEngine On
RewriteRule ^/saml/metadata /metadata.pl
RewriteRule ^/saml/.* /index.pl
# CAS Issuer
RewriteEngine On
RewriteRule ^/cas/.* /index.pl
# OpenID Issuer
RewriteEngine On
RewriteRule ^/openidserver/.* /index.pl
# OpenID Connect Issuer
RewriteEngine On
#RewriteCond %{HTTP:Authorization} .
#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteRule ^/oauth2/.* /index.pl
RewriteRule ^/.well-known/openid-configuration$ /openid-configuration.pl
# Get Issuer
RewriteEngine On
RewriteRule ^/get/.* /index.pl
# Public pages
RewriteEngine On
RewriteRule ^/public* /public.pl
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
Header append Vary User-Agent env=!dont-vary
ExpiresActive On
ExpiresDefault "access plus 1 month"
# Uncomment this if site if you use SSL only
#Header set Strict-Transport-Security 15768000
##############################################
## Best performance under ModPerl::Registry ##
##############################################
# Uncomment this to increase performance of Portal:
#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;