20259: Add documentation for banner and tooltip features
[arvados.git] / tools / salt-install / config_examples / multi_host / aws / pillars / nginx_workbench_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   ### SERVER
16   server:
17     config:
18
19       ### STREAMS
20       http:
21         upstream workbench_upstream:
22           - server: 'localhost:9000 fail_timeout=10s'
23
24   ### SITES
25   servers:
26     managed:
27       ### DEFAULT
28       arvados_workbench_default.conf:
29         enabled: true
30         overwrite: true
31         config:
32           - server:
33             - server_name: workbench.__CLUSTER__.__DOMAIN__
34             - listen:
35               - 80
36             - location /:
37               - return: '301 https://$host$request_uri'
38
39       arvados_workbench_ssl.conf:
40         enabled: true
41         overwrite: true
42         requires:
43           __CERT_REQUIRES__
44         config:
45           - server:
46             - server_name: workbench.__CLUSTER__.__DOMAIN__
47             - listen:
48               - __CONTROLLER_EXT_SSL_PORT__ http2 ssl
49             - index: index.html index.htm
50             - location /:
51               - proxy_pass: 'http://workbench_upstream'
52               - proxy_read_timeout: 300
53               - proxy_connect_timeout: 90
54               - proxy_redirect: 'off'
55               - proxy_set_header: X-Forwarded-Proto https
56               - proxy_set_header: 'Host $http_host'
57               - proxy_set_header: 'X-Real-IP $remote_addr'
58               - proxy_set_header: 'X-Forwarded-For $proxy_add_x_forwarded_for'
59             - include: snippets/ssl_hardening_default.conf
60             - ssl_certificate: __CERT_PEM__
61             - ssl_certificate_key: __CERT_KEY__
62             {%- if ssl_key_encrypted_pillar.ssl_key_encrypted.enabled %}
63             - ssl_password_file: {{ '/run/arvados/' | path_join(ssl_key_encrypted_pillar.ssl_key_encrypted.privkey_password_filename) }}
64             {%- endif %}
65             - access_log: /var/log/nginx/workbench.__CLUSTER__.__DOMAIN__.access.log combined
66             - error_log: /var/log/nginx/workbench.__CLUSTER__.__DOMAIN__.error.log
67
68       arvados_workbench_upstream:
69         enabled: true
70         overwrite: true
71         config:
72           - server:
73             - listen: 'localhost:9000'
74             - server_name: workbench
75             - root: /var/www/arvados-workbench/current/public
76             - index:  index.html index.htm
77             - passenger_enabled: 'on'
78             # yamllint disable-line rule:line-length
79             - access_log: /var/log/nginx/workbench.__CLUSTER__.__DOMAIN__-upstream.access.log combined
80             - error_log: /var/log/nginx/workbench.__CLUSTER__.__DOMAIN__-upstream.error.log