manager-apache2.conf 1.91 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#====================================================================
# 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__>
15 16
	Order deny,allow
	Allow from all
17 18 19 20 21
	Options +ExecCGI
    </Directory>

    # On-line documentation
    Alias /doc/ __DOCDIR__
22
    Alias /lib/ __DOCDIR__lib/
23 24 25
    <Directory __DOCDIR__>
	Order deny,allow
	Allow from all
Clément OUDOT's avatar
Clément OUDOT committed
26
	ErrorDocument 404 /notfound.html
27 28 29
    </Directory>

    # Perl script
30 31
    # Note: to avoid manager stay in memory, we don't use ModPerl::Registry
    #       by default. Change this to increase manager performances
32
    <Files *.pl>
33 34 35
        SetHandler cgi-script
        #SetHandler perl-script
        #PerlResponseHandler ModPerl::Registry
36 37 38 39 40 41 42
    </Files>

    # Directory index
    <IfModule mod_dir.c>
        DirectoryIndex index.pl index.html
    </IfModule>

Yadd's avatar
Yadd committed
43 44 45 46 47 48 49 50 51 52 53 54 55
    <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>
Yadd's avatar
Yadd committed
56 57 58 59 60 61 62
    <Location /doc/>
	<IfModule mod_expires.c>
		ExpiresActive On
		ExpiresDefault "access plus 1 month"
	</IfModule>
    </Location>
    <Location /skins/>
Yadd's avatar
Yadd committed
63 64 65 66 67
	<IfModule mod_expires.c>
		ExpiresActive On
		ExpiresDefault "access plus 1 month"
	</IfModule>
    </Location>
68 69
</VirtualHost>