Help language development. Donate to The Perl Foundation

App::Platform cpan:KAJI last updated on 2019-01-30

examples/02-environment/nginx-ldap.yml
ldap: true
nginx:
  files:
    /etc/nginx/nginx.conf: |
      worker_processes 1;
      events {
          worker_connections  1024;
      }
      http {
          include mime.types;
          default_type application/octet-stream;
          sendfile on;
          keepalive_timeout 65;
          ldap_server ldapserver {
              url ldap://ldap.localhost/dc=example,dc=com?uid?sub?(objectClass=person);
              binddn "cn=admin,dc=example,dc=com";
              binddn_passwd toor;
              group_attribute member;
              group_attribute_is_dn on;
              require group 'cn=docker,ou=groups,dc=example,dc=com';
              require valid_user;
              satisfy all;
          }
          server {
              listen 80;
              server_name localhost;
              error_log /var/log/nginx/error.log;
              access_log /var/log/nginx/access.log;
              auth_ldap "Forbidden";
              auth_ldap_servers ldapserver;
              location / {
                  root html;
                  index index.html index.htm;
              }
              error_page 500 502 503 504  /50x.html;
              location = /50x.html {
                  root html;
              }
          }
      }