handler-nginx.conf 1.26 KB
Newer Older
1
2
3
4
5
6
#====================================================================
# Nginx configuration for LemonLDAP::NG Handler
#====================================================================

# Load LemonLDAP::NG Handler
perl_require Lemonldap/NG/Handler.pm;
7
8
9
10
11
12
perl_set $lmstatus Lemonldap::NG::Handler::handler;

# Log format similar to "combined", but with remote_user found by LL::NG
log_format lm_combined '$remote_addr - $lmremote_user [$time_local] '
                    '"$request" $status $body_bytes_sent '
                    '"$http_referer" "$http_user_agent"';
13
14

# Common error page and security parameters
15
16
error_page 500 http://auth.__DNSDOMAIN__/lmerror/500;
error_page 503 http://auth.__DNSDOMAIN__/lmerror/503;
17
18

server {
19
20
    listen __VHOSTLISTEN__;
    server_name reload.__DNSDOMAIN__;
21
22

    # Configuration reload mechanism (only 1 per physical server is
23
    # needed): choose your URL to avoid reloading Nginx when
24
25
26
    # configuration change
    location /reload {
        allow 127.0.0.0/8;
27
        allow ::1;
28
        deny all;
29
        perl Lemonldap::NG::Handler::reload;
30
31
32
33
34
    }

    # Uncomment this to activate status module
    #location /status {
    #    allow 127.0.0.0/8;
35
    #    allow ::1;
36
    #    deny all;
37
    #    perl Lemonldap::NG::Handler::status;
38
39
40
    #}
}