From abf493afe8cee819b4d6b3b174d10b282a603fdc Mon Sep 17 00:00:00 2001 From: "Pavel \"LEdoian\" Turinsky" Date: Sun, 7 Nov 2021 01:35:21 +0100 Subject: [PATCH] =?UTF-8?q?Update=20konfigur=C3=A1k=C5=AF=20Nginxu=20podle?= =?UTF-8?q?=20aktu=C3=A1ln=C3=ADho=20stavu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup/nginx/mam-test.ks.matfyz.cz | 7 +++++++ setup/nginx/mam.mff.cuni.cz | 20 +++++++++++++++++--- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/setup/nginx/mam-test.ks.matfyz.cz b/setup/nginx/mam-test.ks.matfyz.cz index 27e90979..46f9b2ec 100644 --- a/setup/nginx/mam-test.ks.matfyz.cz +++ b/setup/nginx/mam-test.ks.matfyz.cz @@ -32,6 +32,13 @@ server { location /media/ { root /akce/mam/www/mamweb-test/; } + + location /aesop-export/ { + auth_basic "AESOP API"; + auth_basic_user_file /akce/mam/www/mamweb-test/.htpasswd-aesop; + try_files $uri @mamweb_test; + } + location / { try_files $uri @mamweb_test; } diff --git a/setup/nginx/mam.mff.cuni.cz b/setup/nginx/mam.mff.cuni.cz index 08996adf..99292a67 100644 --- a/setup/nginx/mam.mff.cuni.cz +++ b/setup/nginx/mam.mff.cuni.cz @@ -26,6 +26,12 @@ server { client_max_body_size 50M; + location /aesop-export/ { + auth_basic "AESOP API"; + auth_basic_user_file /akce/mam/www/mamweb-prod/.htpasswd-aesop; + try_files $uri @mamweb_prod; + } + location /static/ { root /akce/mam/www/mamweb-prod/; } @@ -37,9 +43,17 @@ server { location /wiki/ { proxy_pass http://127.0.0.1:5001/; proxy_set_header X-Real_IP $remote_addr; - proxy_redirect off; - sub_filter 'href="/' 'href=/wiki/'; - sub_filter 'src="/' 'src=/wiki/'; + proxy_redirect / /wiki/; + #rewrite '/' '/wiki'; + sub_filter_once off; + sub_filter 'href="/' 'href="/wiki/'; + sub_filter 'src="/' 'src="/wiki/'; + sub_filter 'action="/' 'action="/wiki/'; + # Overkill: + #sub_filter '="/' '="/wiki/'; + #sub_filter ':5001/' '/wiki/'; + #sub_filter 'Location: /' 'Location: /wiki/'; + #sub_filter '_login' '_test'; } location / { try_files $uri @mamweb_prod; }