File: api-nginx.conf

package info (click to toggle)
lemonldap-ng 2.22.2%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 28,516 kB
  • sloc: perl: 82,515; javascript: 25,474; xml: 6,473; makefile: 1,327; sh: 492; sql: 159; python: 55; php: 26
file content (63 lines) | stat: -rw-r--r-- 1,913 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
server {
  listen __PORT__;
  listen [::]:__PORT__;
  server_name manager-api.__DNSDOMAIN__;
  root __MANAGERAPIDIR__;
  # Use "lm_app" format to get username in nginx.log (see nginx-lmlog.conf)
  #access_log /var/log/nginx/manager-api.log lm_app;

  # Uncomment this if you are running behind a reverse proxy and want
  # LemonLDAP::NG to see the real IP address of the end user
  # Adjust the settings to match the IP address of your reverse proxy
  # and the header containing the original IP address
  # As an alternative, you can use the PROXY protocol
  #
  #set_real_ip_from  127.0.0.1;
  #real_ip_header    X-Forwarded-For;

  location /doc/ {
      alias /usr/share/doc/lemonldap-ng-doc/;
      index index.html start.html;
  }
  location / {
      rewrite ^/(.*)$ /api.psgi/$1;
  }

  location ~ ^(?<sc>/.*\.psgi)(?:$|/) {

    # FastCGI configuration
    include /etc/nginx/fastcgi_params;
    fastcgi_pass unix:__FASTCGISOCKDIR__/llng-fastcgi.sock;
    fastcgi_param LLTYPE psgi;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_split_path_info ^(.*\.psgi)(/.*)$;
    fastcgi_param PATH_INFO  $fastcgi_path_info;
    fastcgi_param UNIQUE_ID $request_id;

    # OR TO USE uWSGI
    #include /etc/nginx/uwsgi_params;
    #uwsgi_pass 127.0.0.1:5000;
    #uwsgi_param LLTYPE psgi;
    #uwsgi_param SCRIPT_FILENAME $document_root$sc;
    #uwsgi_param SCRIPT_NAME $sc;
    #uwsgi_param UNIQUE_ID $request_id;

  }

  # By default, access to this VHost is denied
  # If you want to enable the manager APIs, you MUST
  # implement a robust authentication scheme to protect this
  # VHost since LemonLDAP::NG provides no protection to the
  # Manager APIs yet
  #
  #allow 127.0.0.0/8;
  #allow ::1/128;
  deny all;

  # DEBIAN
  # If install was made with USEDEBIANLIBS (official releases), uncomment this
  #location /javascript/ {
  #  alias /usr/share/javascript/;
  #}

}