test-nginx.conf 1.26 KB
Newer Older
1 2 3 4
#====================================================================
# Nginx configuration for LemonLDAP::NG sample applications
#====================================================================

5
# Sample reverse-proxy virtualhost
6
server {
7 8
    listen __VHOSTLISTEN__;
    server_name test1.__DNSDOMAIN__;
9 10

    location / {
11 12
        # Prepare user data transmission to protected HTTP app
        include lemonldap-ng/http-accounting;
13

14 15
        # Trigger Lemonldap::NG access control
        include lemonldap-ng/access-control;
16 17 18

        # Transfer request to backend
        proxy_pass http://target.__DNSDOMAIN__/;
19
    }
20

21
    #access_log /var/log/nginx/access.log lm_combined;
22 23
}

24 25 26 27 28 29
# Sample FastCGI application
server {
    listen __VHOSTLISTEN__;
    server_name test2.__DNSDOMAIN__;

    location / {
30 31
        # Prepare user data transmission to protected FastCGI app
        include lemonldap-ng/fcgi-accounting;
32

33 34
        # Trigger Lemonldap::NG access control
        include lemonldap-ng/access-control;
35 36 37 38 39 40 41 42

        # Transfer request to backend - assume fcgiwrap is installed
        root __TESTDIR__;
        try_files $uri $uri/index.pl;
        include fastcgi_params;
        fastcgi_pass unix:/var/run/fcgiwrap.socket;
    }

43
    #access_log /var/log/nginx/access.log lm_combined;
44
}