portal-apache2.conf 2.99 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#====================================================================
# 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
17
	Options +ExecCGI +FollowSymLinks
18 19 20 21 22 23 24 25 26 27 28 29 30
    </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)
31
    <Location /index.pl/adminSessions>
32 33
	Order deny,allow
	Deny from all
34
    </Location>
35 36

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

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

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

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

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

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

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

94 95 96 97 98
##############################################
## Best performance under ModPerl::Registry ##
##############################################

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