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; }