forked from ISTI-ansible-roles/ansible-roles
Fix the nginx template for the uri-resolver. See https://support.d4science.org/issues/12768
This commit is contained in:
parent
3d7387d06c
commit
6fed3715e1
|
@ -67,6 +67,7 @@ server {
|
||||||
{% for instance in tomcat_m_instances %}
|
{% for instance in tomcat_m_instances %}
|
||||||
{% for context in instance.app_contexts %}
|
{% for context in instance.app_contexts %}
|
||||||
{% if context != "whn-manager" %}
|
{% if context != "whn-manager" %}
|
||||||
|
{% if context != "uri-resolver" %}
|
||||||
{% if context != '' %}
|
{% if context != '' %}
|
||||||
location /{{ context }} {
|
location /{{ context }} {
|
||||||
{% if varnish_install is defined and varnish_install %}
|
{% if varnish_install is defined and varnish_install %}
|
||||||
|
@ -95,6 +96,7 @@ server {
|
||||||
}
|
}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% if smart_executor_install is defined and smart_executor_install %}
|
{% if smart_executor_install is defined and smart_executor_install %}
|
||||||
|
@ -157,7 +159,10 @@ server {
|
||||||
{% if smartgears_nginx_cors_enabled %}
|
{% if smartgears_nginx_cors_enabled %}
|
||||||
include /etc/nginx/snippets/nginx-cors.conf;
|
include /etc/nginx/snippets/nginx-cors.conf;
|
||||||
{% endif %}
|
{% endif %}
|
||||||
proxy_pass http://127.0.0.1:{{ smartgears_http_port }}/uri-resolver/;
|
rewrite ^ $request_uri;
|
||||||
|
rewrite ^/(.*) uri-resolver/$1 break;
|
||||||
|
return 400; #if the second rewrite won't match
|
||||||
|
proxy_pass http://127.0.0.1:{{ smartgears_http_port }}/$uri;
|
||||||
}
|
}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
@ -238,6 +243,7 @@ server {
|
||||||
{% for instance in tomcat_m_instances %}
|
{% for instance in tomcat_m_instances %}
|
||||||
{% for context in instance.app_contexts %}
|
{% for context in instance.app_contexts %}
|
||||||
{% if context != "whn-manager" %}
|
{% if context != "whn-manager" %}
|
||||||
|
{% if context != "uri-resolver" %}
|
||||||
{% if context != '' %}
|
{% if context != '' %}
|
||||||
location /{{ context }} {
|
location /{{ context }} {
|
||||||
{% if varnish_install is defined and varnish_install %}
|
{% if varnish_install is defined and varnish_install %}
|
||||||
|
@ -266,6 +272,7 @@ server {
|
||||||
}
|
}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% if smart_executor_install is defined and smart_executor_install %}
|
{% if smart_executor_install is defined and smart_executor_install %}
|
||||||
|
@ -320,14 +327,20 @@ server {
|
||||||
allow {{ ip }};
|
allow {{ ip }};
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
deny all;
|
deny all;
|
||||||
proxy_pass http://127.0.0.1:{{ smartgears_http_port }}/uri-resolver/geonetwork;
|
rewrite ^ $request_uri;
|
||||||
|
rewrite ^/(.*) uri-resolver/$1 break;
|
||||||
|
return 400; #if the second rewrite won't match
|
||||||
|
proxy_pass http://127.0.0.1:{{ smartgears_http_port }}/$uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
{% if smartgears_nginx_cors_enabled %}
|
{% if smartgears_nginx_cors_enabled %}
|
||||||
include /etc/nginx/snippets/nginx-cors.conf;
|
include /etc/nginx/snippets/nginx-cors.conf;
|
||||||
{% endif %}
|
{% endif %}
|
||||||
proxy_pass http://127.0.0.1:{{ smartgears_http_port }}/uri-resolver/;
|
rewrite ^ $request_uri;
|
||||||
|
rewrite ^/(.*) uri-resolver/$1 break;
|
||||||
|
return 400; #if the second rewrite won't match
|
||||||
|
proxy_pass http://127.0.0.1:{{ smartgears_http_port }}/$uri;
|
||||||
}
|
}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue