diff --git a/smartgears/smartgears-nginx-frontend/defaults/main.yml b/smartgears/smartgears-nginx-frontend/defaults/main.yml index 4f10d081..b69e5630 100644 --- a/smartgears/smartgears-nginx-frontend/defaults/main.yml +++ b/smartgears/smartgears-nginx-frontend/defaults/main.yml @@ -7,3 +7,4 @@ smartgears_install_generic_virthost: True smartgears_nginx_cors_enabled: False nginx_cors_acl_origin: '' data_transfer_service_install: False +smartgears_nginx_expose_tomcat_logs: False diff --git a/smartgears/smartgears-nginx-frontend/templates/generic-smartgears-virtualhost.j2 b/smartgears/smartgears-nginx-frontend/templates/generic-smartgears-virtualhost.j2 index 04be5b9d..5076e47a 100644 --- a/smartgears/smartgears-nginx-frontend/templates/generic-smartgears-virtualhost.j2 +++ b/smartgears/smartgears-nginx-frontend/templates/generic-smartgears-virtualhost.j2 @@ -93,6 +93,15 @@ server { proxy_pass http://localhost:8787/; } {% endif %} + + {% if smartgears_nginx_expose_tomcat_logs %} + location /gcube-logs/ { + alias {{ smartgears_instance_path }}/logs/; + autoindex on; + autoindex_localtime on; + } + {% endif %} + {% else %} location / { {% if smartgears_nginx_cors_enabled %} @@ -198,5 +207,12 @@ server { } {% endif %} + {% if smartgears_nginx_expose_tomcat_logs %} + location /gcube-logs/ { + alias {{ smartgears_instance_path }}/logs; + autoindex on; + autoindex_localtime on; + } + {% endif %} } {% endif %}