portal-apache.conf 2.88 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
#====================================================================
# 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__>
	Order allow,deny
	Allow from all
	Options +ExecCGI
    </Directory>

    # Perl script
    <Files *.pl>
        SetHandler perl-script
        PerlHandler Apache::Registry
    </Files>

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

    # SOAP functions for sessions management (disabled by default)
32
    <Location /index.pl/adminSessions>
33 34
	Order deny,allow
	Deny from all
35
    </Location>
36 37

    # SOAP functions for sessions access (disabled by default)
38
    <Location /index.pl/sessions>
39 40
	Order deny,allow
	Deny from all
41
    </Location>
42 43

    # SOAP functions for configuration access (disabled by default)
44
    <Location /index.pl/config>
45 46
	Order deny,allow
	Deny from all
47
    </Location>
48 49

    # SOAP functions for notification insertion (disabled by default)
50
    <Location /index.pl/notification>
51 52
	Order deny,allow
	Deny from all
53
    </Location>
54

55
    # SAML2 Issuer
56 57 58 59 60 61
    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteRule ^/saml/metadata /metadata.pl
        RewriteRule ^/saml/.* /index.pl
    </IfModule>

62
    # CAS Issuer
Clément OUDOT's avatar
Clément OUDOT committed
63 64 65 66 67
    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteRule ^/cas/.* /index.pl
    </IfModule>

68 69 70 71 72 73
    # OpenID Issuer
    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteRule ^/openidserver/.* /index.pl
    </IfModule>

Yadd's avatar
Yadd committed
74 75 76 77 78 79 80 81 82 83 84 85 86
    <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
Typo  
Yadd committed
87
    <Location /skins/>
Yadd's avatar
Yadd committed
88 89 90 91 92
	<IfModule mod_expires.c>
		ExpiresActive On
		ExpiresDefault "access plus 1 month"
	</IfModule>
    </Location>
93 94 95 96 97
</VirtualHost>

# Best performance under ModPerl::Registry
# Uncomment this to increase performance of Portal
<Perl>
98 99 100
    #require Lemonldap::NG::Portal::SharedConf;
    #Lemonldap::NG::Portal::SharedConf->compile(
    #    qw(delete header cache read_from_client cookie redirect unescapeHTML));
101
    # Uncomment this line if you use Lemonldap::NG menu
102
    #require Lemonldap::NG::Portal::Menu;
103
    # Uncomment this line if you use portal SOAP capabilities
104
    #require SOAP::Lite;
105 106
</Perl>