lemonldap-ng/_example/etc/manager-apache2.X.conf
2015-06-17 16:13:28 +00:00

86 lines
2.6 KiB
Plaintext

#====================================================================
# 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 __MANAGERSTATICDIR__>
<IfVersion >= 2.3>
Require all granted
</IfVersion>
<IfVersion < 2.3>
Order Deny,Allow
Allow from all
</IfVersion>
Options +FollowSymLinks
</Directory>
# On-line documentation
Alias /doc/ __DEFDOCDIR__
Alias /lib/ __DEFDOCDIR__lib/
<Directory __DEFDOCDIR__>
<IfVersion >= 2.3>
Require all granted
</IfVersion>
<IfVersion < 2.3>
Order Deny,Allow
Allow from all
</IfVersion>
ErrorDocument 404 /notfound.html
Options +FollowSymLinks
</Directory>
# French version (needs fr-doc installation)
Alias /fr-doc/ __FRDOCDIR__
<Directory __FRDOCDIR__>
<IfVersion >= 2.3>
Require all granted
</IfVersion>
<IfVersion < 2.3>
Order Deny,Allow
Allow from all
</IfVersion>
ErrorDocument 404 /notfoundfr.html
Options +FollowSymLinks
</Directory>
# Perl script
# Note: to increase performance, you can avoid manager stay in memory
# by using "SetHandler cgi-script" instead of Plack framework
<Location />
Require all granted
Options +ExecCGI
SetHandler perl-script
PerlResponseHandler Plack::Handler::Apache2
PerlSetVar psgi_app __MANAGERPSGIDIR__/manager-server.psgi
<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>
<LocationMatch ^/(static|doc|lib|fr-doc)>
SetHandler none
Options -ExecCGI
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 month"
</IfModule>
</LocationMatch>
</VirtualHost>