mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-07-30 03:05:51 +02:00
Update to 2024-11-06 12:00
This commit is contained in:
@@ -22,6 +22,32 @@ server {
|
||||
rewrite ^/(.*)$ /index.psgi/$1 break;
|
||||
}
|
||||
|
||||
location ~ ^/(?<sc>/index\.psgi)/((adminS|s)essions|config|notification) {
|
||||
{% if llng_engine == 'fastcgi' %}
|
||||
include /etc/nginx/fastcgi_params;
|
||||
fastcgi_pass unix:/var/run/llng-fastcgi-server/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;
|
||||
{% elif llng_engine == 'uwsgi' %}
|
||||
include /etc/nginx/uwsgi_params;
|
||||
uwsgi_pass unix:/run/llng-uwsgi/llng-uwsgi.sock;
|
||||
uwsgi_param LLTYPE psgi;
|
||||
uwsgi_param SCRIPT_FILENAME $document_root$sc;
|
||||
uwsgi_param SCRIPT_NAME $sc;
|
||||
{% endif %}
|
||||
{% for ip in llng_api_src_ip %}
|
||||
allow {{ ip }};
|
||||
{% endfor %}
|
||||
deny all;
|
||||
{% if llng_api_pass is defined %}
|
||||
auth_basic "Lemonldap::NG API";
|
||||
auth_basic_user_file /etc/lemonldap-ng/api.htpasswd;
|
||||
satisfy all;
|
||||
{% endif %}
|
||||
}
|
||||
|
||||
location ~ ^(?<sc>/.*\.psgi)(?:$|/) {
|
||||
{% if llng_engine == 'fastcgi' %}
|
||||
include /etc/nginx/fastcgi_params;
|
||||
@@ -50,22 +76,6 @@ server {
|
||||
location / {
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
|
||||
location ~ ^/index.psgi/adminSessions {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location ~ ^/index.psgi/sessions {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location ~ ^/index.psgi/config {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location ~ ^/index.psgi/notification {
|
||||
deny all;
|
||||
}
|
||||
}
|
||||
|
||||
{% if llng_api_src_ip | length > 0 or llng_api_pass is defined %}
|
||||
|
Reference in New Issue
Block a user