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

74 lines
1.9 KiB
Plaintext
Raw Normal View History

server {
listen __PORT__;
server_name auth.__DNSDOMAIN__;
2017-02-28 21:40:29 +01:00
root __PORTALSITEDIR__;
2017-01-03 18:23:38 +01:00
if ($uri !~ ^/((static|javascript|favicon).*|.*\.psgi)) {
rewrite ^/(.*)$ /index.psgi/$1 break;
}
location ~ \.psgi(?:$|/) {
2017-01-21 14:22:52 +01:00
# Note that Content-Security-Policy header is generated by portal itself
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;
2017-01-09 22:54:06 +01:00
fastcgi_param LLTYPE psgi;
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 20:32:19 +01:00
fastcgi_param PATH_INFO $fastcgi_path_info;
2017-01-15 15:28:48 +01:00
# Uncomment this if you use Auth SSL:
#map $ssl_client_s_dn $ssl_client_s_dn_cn {
# default "";
# ~/CN=(?<CN>[^/]+) $CN;
#}
#fastcgi_param SSL_CLIENT_S_DN_CN $ssl_client_s_dn_cn
2018-03-22 21:52:00 +01:00
# OU TO USE uWSGI
#include /etc/nginx/uwsgi_params;
#uwsgi_pass 127.0.0.1:5000;
#uwsgi_param LLTYPE psgi;
#uwsgi_param SCRIPT_FILENAME /path/to/portal/index.psgi;
#uwsgi_param SCRIPT_NAME /index.psgi;
}
2017-01-03 18:23:38 +01:00
index index.psgi;
location / {
try_files $uri $uri/ =404;
# Uncomment this if you use https only
#add_header Strict-Transport-Security "15768000";
}
2016-02-16 12:19:32 +01:00
2017-01-09 22:54:06 +01:00
location /static/ {
alias __PORTALSTATICDIR__;
}
# REST/SOAP functions for sessions management (disabled by default)
2017-08-30 17:30:44 +02:00
location /index.psgi/adminSessions {
2016-02-18 12:49:30 +01:00
deny all;
}
# REST/SOAP functions for sessions access (disabled by default)
2017-01-03 18:23:38 +01:00
location /index.psgi/sessions {
2016-02-18 12:49:30 +01:00
deny all;
}
# REST/SOAP functions for configuration access (disabled by default)
2017-01-03 18:23:38 +01:00
location /index.psgi/config {
2016-02-18 12:49:30 +01:00
deny all;
}
# REST/SOAP functions for notification insertion (disabled by default)
2017-01-03 18:23:38 +01:00
location /index.psgi/notification {
2016-02-18 12:49:30 +01:00
deny all;
}
2016-02-16 12:19:32 +01:00
# DEBIAN
# If install was made with USEDEBIANLIBS (official releases), uncomment this
#location /javascript/ {
# alias /usr/share/javascript/;
#}
}