lemonldap-ng/_example/etc/manager-nginx.conf

58 lines
1.5 KiB
Plaintext
Raw Normal View History

server {
listen __PORT__;
server_name manager.__DNSDOMAIN__;
2017-02-28 21:40:29 +01:00
root __MANAGERSITEDIR__;
2018-05-22 15:06:45 +02:00
# Use "lm_app" format to get username in nginx.log (see nginx-lmlog.conf)
#access_log /var/log/nginx/portal.log lm_app;
2018-06-07 18:58:55 +02:00
if ($uri !~ ^/(.*\.psgi|static|doc|lib|javascript|favicon)) {
rewrite ^/(.*)$ /manager.psgi/$1 break;
}
2018-03-27 21:50:22 +02:00
location ~ ^(?<sc>/.*\.psgi)(?:$|/) {
2018-03-22 21:52:00 +01:00
# FastCGI configuration
include /etc/nginx/fastcgi_params;
2016-02-15 22:12:56 +01:00
fastcgi_pass unix:__FASTCGISOCKDIR__/llng-fastcgi.sock;
fastcgi_param LLTYPE psgi;
2017-01-18 20:47:29 +01:00
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
2017-01-18 18:55:04 +01:00
fastcgi_split_path_info ^(.*\.psgi)(/.*)$;
2017-01-09 22:54:06 +01:00
fastcgi_param PATH_INFO $fastcgi_path_info;
2018-03-22 21:52:00 +01:00
2018-06-08 23:48:36 +02:00
# OR TO USE uWSGI
2018-03-22 21:52:00 +01:00
#include /etc/nginx/uwsgi_params;
#uwsgi_pass 127.0.0.1:5000;
#uwsgi_param LLTYPE psgi;
2018-03-27 21:50:22 +02:00
#uwsgi_param SCRIPT_FILENAME $document_root$sc;
#uwsgi_param SCRIPT_NAME $sc;
2018-03-22 21:52:00 +01:00
2017-01-18 22:13:08 +01:00
# Uncomment this if you use https only
#add_header Strict-Transport-Security "15768000";
}
location / {
2016-02-18 13:23:55 +01:00
index manager.psgi;
try_files $uri $uri/ =404;
allow 127.0.0.0/8;
deny all;
}
2016-02-16 12:19:32 +01:00
2016-02-21 09:29:19 +01:00
location /doc/ {
alias __DEFDOCDIR__;
index index.html start.html;
2016-02-21 09:29:19 +01:00
}
location /lib/ {
2017-01-18 22:13:08 +01:00
alias __DEFDOCDIR__pages/documentation/current/lib/;
2016-02-21 09:29:19 +01:00
}
2017-01-18 22:13:08 +01:00
location /static/ {
alias __MANAGERSTATICDIR__;
}
# DEBIAN
# If install was made with USEDEBIANLIBS (official releases), uncomment this
#location /javascript/ {
# alias /usr/share/javascript/;
#}
}