20259: Add documentation for banner and tooltip features
[arvados.git] / tools / salt-install / config_examples / multi_host / aws / pillars / nginx_workbench2_configuration.sls
1 ---
2 # Copyright (C) The Arvados Authors. All rights reserved.
3 #
4 # SPDX-License-Identifier: AGPL-3.0
5
6 {%- import_yaml "ssl_key_encrypted.sls" as ssl_key_encrypted_pillar %}
7
8 ### ARVADOS
9 arvados:
10   config:
11     group: www-data
12
13 ### NGINX
14 nginx:
15   ### SITES
16   servers:
17     managed:
18       ### DEFAULT
19       arvados_workbench2_default.conf:
20         enabled: true
21         overwrite: true
22         config:
23           - server:
24             - server_name: workbench2.__CLUSTER__.__DOMAIN__
25             - listen:
26               - 80
27             - location /:
28               - return: '301 https://$host$request_uri'
29
30       arvados_workbench2_ssl.conf:
31         enabled: true
32         overwrite: true
33         requires:
34           __CERT_REQUIRES__
35         config:
36           - server:
37             - server_name: workbench2.__CLUSTER__.__DOMAIN__
38             - listen:
39               - __CONTROLLER_EXT_SSL_PORT__ http2 ssl
40             - index: index.html index.htm
41             - location /:
42               - root: /var/www/arvados-workbench2/workbench2
43               - try_files: '$uri $uri/ /index.html'
44               - 'if (-f $document_root/maintenance.html)':
45                 - return: 503
46             - location /config.json:
47               - return: {{ "200 '" ~ '{"API_HOST":"__CLUSTER__.__DOMAIN__:__CONTROLLER_EXT_SSL_PORT__"}' ~ "'" }}
48             - include: snippets/ssl_hardening_default.conf
49             - ssl_certificate: __CERT_PEM__
50             - ssl_certificate_key: __CERT_KEY__
51             {%- if ssl_key_encrypted_pillar.ssl_key_encrypted.enabled %}
52             - ssl_password_file: {{ '/run/arvados/' | path_join(ssl_key_encrypted_pillar.ssl_key_encrypted.privkey_password_filename) }}
53             {%- endif %}
54             - access_log: /var/log/nginx/workbench2.__CLUSTER__.__DOMAIN__.access.log combined
55             - error_log: /var/log/nginx/workbench2.__CLUSTER__.__DOMAIN__.error.log