handler-apache2.X.conf 2.42 KB
Newer Older
Xavier Guimard's avatar
Xavier Guimard committed
1
#========================================================================
2
# Apache configuration for LemonLDAP::NG Handler
Xavier Guimard's avatar
Xavier Guimard committed
3 4 5 6 7 8 9 10 11 12 13
#========================================================================
# This file implements the reload virtualhost that permits to reload
# configuration without restarting server, and some common instructions.
# You need then to declare this vhost in reloadUrls (in the manager
# interface if this server doesn't host the manager itself):
#
#         KEY       :               VALUE
#   host-or-IP:port :  http://reload.example.com/reload
#
# IMPORTANT:
# To protect applications, see test-apache.conf template in example files
14 15 16 17 18 19

# Uncomment this if no previous NameVirtualHost declaration
#NameVirtualHost __VHOSTLISTEN__

# Load LemonLDAP::NG Handler
PerlOptions +GlobalRequest
20
PerlModule Lemonldap::NG::Handler::ApacheMP2
21 22

# Common error page and security parameters
23
ErrorDocument 403 http://auth.__DNSDOMAIN__/lmerror/403
24
ErrorDocument 404 http://auth.__DNSDOMAIN__/lmerror/404
25
ErrorDocument 500 http://auth.__DNSDOMAIN__/lmerror/500
26
ErrorDocument 502 http://auth.__DNSDOMAIN__/lmerror/502
27
ErrorDocument 503 http://auth.__DNSDOMAIN__/lmerror/503
28 29 30 31 32 33 34 35 36 37

<VirtualHost __VHOSTLISTEN__>
    ServerName reload.__DNSDOMAIN__

    # Configuration reload mechanism (only 1 per physical server is
    # needed): choose your URL to avoid restarting Apache when
    # configuration change
    <Location /reload>
        <IfVersion >= 2.3>
            Require ip 127 ::1
38
        </IfVersion>
39 40 41 42 43
        <IfVersion < 2.3>
            Order Deny,Allow
            Deny from all
            Allow from 127.0.0.0/8 ::1
        </IfVersion>
44
        SetHandler perl-script
45
        PerlResponseHandler Lemonldap::NG::Handler::ApacheMP2->reload
46 47 48 49 50 51
    </Location>

    # Uncomment this to activate status module
    #<Location /status>
    #    <IfVersion >= 2.3>
    #        Require ip 127 ::1
52
    #    </IfVersion>
53 54 55 56 57 58
    #    <IfVersion < 2.3>
    #        Order Deny,Allow
    #        Deny from all
    #        Allow from 127.0.0.0/8 ::1
    #    </IfVersion>
    #    SetHandler perl-script
59
    #    PerlResponseHandler Lemonldap::NG::Handler::ApacheMP2->status
60 61 62 63 64
    #    # You may have to uncomment the next directive to skip
    #    # an upper PerlHeaderParserHandler directive
    #    #PerlHeaderParserHandler Apache2::Const::DECLINED
    #</Location>

65 66
    # Uncomment this if site if you use SSL only
    #Header set Strict-Transport-Security 15768000
67 68 69
</VirtualHost>