manager-nginx.conf 1.19 KB
Newer Older
1 2 3
server {
  listen __PORT__;
  server_name manager.__DNSDOMAIN__;
4
  root __MANAGERSITEDIR__;
5

6
  if ($uri !~ ^/(.*\.psgi|static|doc|fr-doc|lib|javascript|favicon)) {
7 8 9
    rewrite ^/(.*)$ /manager.psgi/$1 break;
  }

10
  location ~ \.psgi(?:$|/) {
11
    include /etc/nginx/fastcgi_params;
Xavier Guimard's avatar
Xavier Guimard committed
12
    fastcgi_pass unix:__FASTCGISOCKDIR__/llng-fastcgi.sock;
13
    fastcgi_param LLTYPE psgi;
14
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
Xavier Guimard's avatar
Xavier Guimard committed
15
    fastcgi_split_path_info ^(.*\.psgi)(/.*)$;
16
    fastcgi_param PATH_INFO  $fastcgi_path_info;
17 18
    # Uncomment this if you use https only
    #add_header Strict-Transport-Security "15768000";
19 20 21
  }

  location / {
22
    index manager.psgi;
23
    try_files $uri $uri/ =404;
24 25
    allow 127.0.0.0/8;
    deny all;
26
  }
27

Xavier Guimard's avatar
Xavier Guimard committed
28 29
  location /doc/ {
    alias __DEFDOCDIR__;
30
    index index.html start.html;
Xavier Guimard's avatar
Xavier Guimard committed
31 32
  }
  location /lib/ {
33
    alias __DEFDOCDIR__pages/documentation/current/lib/;
Xavier Guimard's avatar
Xavier Guimard committed
34 35 36
  }
  location /fr-doc/ {
    alias __FRDOCDIR__;
37
    index index.html start.html;
Xavier Guimard's avatar
Xavier Guimard committed
38
  }
39 40 41 42 43 44 45 46 47 48
  location /static/ {
    alias __MANAGERSTATICDIR__;
  }

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

49
}