2016-01-29 17:50:16 +01:00
|
|
|
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;
|
2016-01-29 17:50:16 +01:00
|
|
|
|
2018-06-07 18:58:55 +02:00
|
|
|
if ($uri !~ ^/(.*\.psgi|static|doc|lib|javascript|favicon)) {
|
2016-01-29 17:50:16 +01:00
|
|
|
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
|
2016-01-29 17:50:16 +01:00
|
|
|
include /etc/nginx/fastcgi_params;
|
2016-02-15 22:12:56 +01:00
|
|
|
fastcgi_pass unix:__FASTCGISOCKDIR__/llng-fastcgi.sock;
|
2017-02-22 22:48:52 +01:00
|
|
|
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";
|
2016-01-29 17:50:16 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
location / {
|
2016-02-18 13:23:55 +01:00
|
|
|
index manager.psgi;
|
2016-02-11 10:36:12 +01:00
|
|
|
try_files $uri $uri/ =404;
|
2017-02-22 22:48:52 +01:00
|
|
|
allow 127.0.0.0/8;
|
|
|
|
deny all;
|
2016-01-29 17:50:16 +01:00
|
|
|
}
|
2016-02-16 12:19:32 +01:00
|
|
|
|
2016-02-21 09:29:19 +01:00
|
|
|
location /doc/ {
|
|
|
|
alias __DEFDOCDIR__;
|
2016-11-23 19:26:56 +01:00
|
|
|
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/;
|
|
|
|
#}
|
|
|
|
|
2016-01-29 17:50:16 +01:00
|
|
|
}
|