X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/71be4f147153573074a3eff4bfa1be559bc091b5..267c02294d7d5c1f161921f9dade6b692a7029a2:/tools/salt-install/config_examples/single_host/single_hostname/pillars/nginx_workbench2_configuration.sls diff --git a/tools/salt-install/config_examples/single_host/single_hostname/pillars/nginx_workbench2_configuration.sls b/tools/salt-install/config_examples/single_host/single_hostname/pillars/nginx_workbench2_configuration.sls index 462443c1fa..d28fe80278 100644 --- a/tools/salt-install/config_examples/single_host/single_hostname/pillars/nginx_workbench2_configuration.sls +++ b/tools/salt-install/config_examples/single_host/single_hostname/pillars/nginx_workbench2_configuration.sls @@ -1,21 +1,43 @@ --- # Copyright (C) The Arvados Authors. All rights reserved. # -# SPDX-License-Identifier: AGPL-3.0 +# SPDX-License-Identifier: Apache-2.0 + +{%- if grains.os_family in ('RedHat',) %} + {%- set group = 'nginx' %} +{%- else %} + {%- set group = 'www-data' %} +{%- endif %} ### ARVADOS arvados: config: - group: www-data + group: {{ group }} ### NGINX nginx: ### SITES servers: managed: - arvados_workbench2_ssl: + ### DEFAULT + arvados_workbench2_default.conf: + enabled: true + overwrite: true + config: + - server: + - server_name: workbench2.__CLUSTER__.__DOMAIN__ + - listen: + - 80 + - location /.well-known: + - root: /var/www + - location /: + - return: '301 https://$host$request_uri' + + arvados_workbench2_ssl.conf: enabled: true overwrite: true + requires: + __CERT_REQUIRES__ config: - server: - server_name: __HOSTNAME_EXT__ @@ -29,6 +51,8 @@ nginx: - return: 503 - location /config.json: - return: {{ "200 '" ~ '{"API_HOST":"__HOSTNAME_EXT__:__CONTROLLER_EXT_SSL_PORT__"}' ~ "'" }} - - include: 'snippets/arvados-snakeoil.conf' + - include: snippets/ssl_hardening_default.conf + - ssl_certificate: __CERT_PEM__ + - ssl_certificate_key: __CERT_KEY__ - access_log: /var/log/nginx/workbench2.__CLUSTER__.__DOMAIN__.access.log combined - error_log: /var/log/nginx/workbench2.__CLUSTER__.__DOMAIN__.error.log