Add a conditional section for the uri-resolver.

This commit is contained in:
Andrea Dell'Amico 2018-10-18 18:05:17 +02:00
parent 47148c448d
commit 5a9fb9328a
1 changed files with 47 additions and 12 deletions

View File

@ -126,6 +126,15 @@ server {
proxy_pass http://{{ remote_opencpu_host }}:{{ opencpu_proxy_port | default('8004') }}{{ opencpu_context | default('/ocpu') }};
}
{% endif %}
{% if smartgears_nginx_expose_tomcat_logs %}
location /gcube-logs/ {
alias {{ smartgears_instance_path }}/logs/;
autoindex on;
autoindex_localtime on;
}
{% endif %}
{% if rstudio_install_server is defined and rstudio_install_server %}
location / {
{% if smartgears_nginx_cors_enabled %}
@ -135,12 +144,20 @@ server {
}
{% endif %}
{% if smartgears_nginx_expose_tomcat_logs %}
location /gcube-logs/ {
alias {{ smartgears_instance_path }}/logs/;
autoindex on;
autoindex_localtime on;
}
{% if smartgears_uri_resolver_install is defined and smartgears_uri_resolver_install %}
location /geonetwork {
{% for ip in ckan_ip_list %}
allow {{ ip }};
{% endfor %}
deny all;
}
location / {
{% if smartgears_nginx_cors_enabled %}
include /etc/nginx/snippets/nginx-cors.conf;
{% endif %}
proxy_pass http://127.0.0.1:{{ smartgears_http_port }}/uri-resolver/;
}
{% endif %}
{% else %}
@ -278,6 +295,15 @@ server {
proxy_pass http://{{ remote_opencpu_host }}:{{ opencpu_proxy_port | default('8004') }}{{ opencpu_context | default('/ocpu') }};
}
{% endif %}
{% if smartgears_nginx_expose_tomcat_logs %}
location /gcube-logs/ {
alias {{ smartgears_instance_path }}/logs/;
autoindex on;
autoindex_localtime on;
}
{% endif %}
{% if rstudio_install_server is defined and rstudio_install_server %}
location / {
{% if smartgears_nginx_cors_enabled %}
@ -287,12 +313,21 @@ server {
}
{% endif %}
{% if smartgears_nginx_expose_tomcat_logs %}
location /gcube-logs/ {
alias {{ smartgears_instance_path }}/logs/;
autoindex on;
autoindex_localtime on;
}
{% if smartgears_uri_resolver_install is defined and smartgears_uri_resolver_install %}
location /geonetwork {
{% for ip in ckan_ip_list %}
allow {{ ip }};
{% endfor %}
deny all;
}
location / {
{% if smartgears_nginx_cors_enabled %}
include /etc/nginx/snippets/nginx-cors.conf;
{% endif %}
proxy_pass http://127.0.0.1:{{ smartgears_http_port }}/uri-resolver/;
}
{% endif %}
}
{% endif %}