#====================================================================
# Apache configuration for LemonLDAP::NG Handler
#====================================================================

# Load LemonLDAP::NG Handler
PerlOptions +GlobalRequest
PerlRequire Lemonldap/NG/Handler.pm

# Common error page and security parameters
#ErrorDocument 403 http://auth.{$DomainName}/?lmError=403
#ErrorDocument 500 http://auth.{$DomainName}/?lmError=500


# Configuration reload mechanism (only 1 per physical server is
# needed): choose your URL to avoid restarting Apache when
# configuration change
# Dummy Alias so apache allows access to /lm-reload
Alias /lm-reload /etc/httpd/proxy/proxy.pac
<Location /lm-reload>
    SSLRequireSSL on
    Order deny,allow
    Deny from all
    Allow from {"$LocalIP $localAccess $externalSSLAccess";}
    PerlHeaderParserHandler Lemonldap::NG::Handler->refresh
</Location>

# Uncomment this to activate status module
#<Location /status>
#    Order deny,allow
#    Deny from all
#    Allow from 127.0.0.0/8
#    PerlHeaderParserHandler Lemonldap::NG::Handler->status
#</Location>

